<template>
  <div class="pagestyle">
    <div class="head">
      <div class="tabs">
        <div style="cursor: pointer" @click="(page = 1,state.mobanTypeObjoverview = undefined), (sIndex = null)" :class="{ active: page == 1 }">
          分站配置
        </div>
        <div style="cursor: pointer" @click="page = 2,state.mobanTypeObjoverview = undefined" :class="{ active: page == 2 }">
          通道配置
        </div>
      </div>
      <div v-if="userStore.modify" style="display: flex; justify-content: space-between">
        <el-button type="primary" style="margin: 0 8px 0 0" v-if="hiddDev" @click="scanDev">扫描设备</el-button>
        <oneclickDelivery></oneclickDelivery>
        <!-- <el-button style="background-color: #00baad; color: #fff"
          >一键下发</el-button
        > -->
      </div>
    </div>
    <div class="container">
      <!-- 分站配置 -->
      <div class="info substation" v-if="page == 1">
        <div class="substationList" :class="{ openSub: hiddDev && !showcedian, openCedian: showcedian }">
          <div class="list_head">
            <div class="title">
              <svg-icon icon-class="biaotitubiao" />
              <div style="margin: 0 0 0 8px">
                分站({{ subStationList.length }})
              </div>
            </div>
            <div class="filter">
              <el-cascader v-if="!showInput" v-model="form.stationAreaId" :props="props" :show-all-levels="false"
                :options="areaList" placeholder="请选择区域" clearable @change="handleChange" size="small"
                style="width: 100px; margin: 0 20px 0 0" :style="{
                  margin: showcedian ? '0 8px 0 0' : '0 20px 0 0',
                  width: showcedian ? '96px' : '',
                }" />
              <el-select v-if="!showInput" clearable v-model="form.status" size="small" style="width: 90px"
                @change="handleChange3">
                <el-option v-for="item in filerArr" :key="item.value" :label="item.label" :value="item.value" />
              </el-select>
              <svg-icon style="margin: 0 8px 0 8px; cursor: pointer" v-if="!showInput" @click="openSearch"
                icon-class="sousuo" />
              <el-input v-if="showInput" v-model="form.key" style="width: 160px; margin: 0 8px 0 8px" size="small"
                placeholder="输入编号、位置等" suffix-icon="Search" clearable ref="input1" @change="searchSatation"
                @blur="showInput = false" />
              <svg-icon v-if="userStore.modify" icon-class="xinzeng" style="cursor: pointer" @click="
                  (open_add = true),
                    (form_add.channelNo = 1),
                    (activeName = '2')
                " />
              <svg-icon v-if="showcedian" @click="closeSub" icon-class="zhankai" style="cursor: pointer" />
            </div>
          </div>
          <div class="list_box">
            <div class="item" v-for="(item, index) in subStationList" :key="item" :class="{
                yichang: item.color == '橙色',
                baojing: item.color == '红色',
                huise: item.color == '灰色',
                select:
                  sIndex2 == index &&
                  (item.color == null || item.color == '灰色'),
                select1: sIndex2 == index && item.color == '红色',
                select2: sIndex2 == index && item.color == '橙色',
              }" @mouseover="showMore = item" @mouseleave="
                (showMore = null),
                  (showDetail = null),
                  (showYichang = null),
                  (showNum = null)
              ">
              <div class="img" @click="clicksSub(item, index)" style="cursor: pointer">
                <img v-if="!item.stationTypeImagePath" src="@/assets/images/分站.svg" alt="" />
                <img v-if="item.stationTypeImagePath" :src="item.stationTypeImagePath" alt=""
                  style="height: 35px; width: 34px" />
                <img @mouseover="showYichang = item" v-if="item.color == '橙色'" src="@/assets/images/异常.svg" alt=""
                  class="yc" />
                <img @mouseover="showYichang = item" v-if="item.color == '红色'" src="@/assets/images/报警.svg" alt=""
                  class="yc" />
              </div>
              <div class="item_info">
                <div class="info_name">
                  <span @click="clicksSub(item, index)" style="cursor: pointer">
                    【{{ item.stationCode }}】 {{ item.stationPlaceName }}
                  </span>
                  <div style="
                      width: 25px;
                      height: 14px;
                      display: flex;
                      justify-content: flex-end;
                    " @click="(showCaozuo = item), (showDetail = null)">
                    <img v-if="showMore == item" src="@/assets/images/更多.svg" alt="" />
                  </div>
                </div>
                <div class="info_data" @click="clicksSub(item, index)" style="cursor: pointer">
                  <div class="one" :title="item.stationTypeName">
                    {{ item.stationTypeName }}
                  </div>
                  <div class="two" style="cursor: pointer" @mouseover="showDetail = item">
                    {{ item.channelName }}
                    <span style="color: #67c23a" @mouseover="getPointList2(item, 1)">{{ item.normalNum }}</span>
                    <span>/</span>
                    <span style="color: #f56c6c" @mouseover="getPointList2(item, 2)">{{ item.errorNum }}</span>
                    <span>/</span>
                    <span style="color: #49a6f2" @mouseover="getPointList2(item, 3)">{{ item.unUsedNum }}</span>
                  </div>
                </div>
              </div>
              <!-- 操作 -->
              <div class="caozuo" v-if="showCaozuo == item" @mouseleave="showCaozuo = null">
                <div class="selects" style="cursor: pointer" @click="cliclCaozuo(1, item)">
                  查看详情
                </div>
                <div class="selects" style="cursor: pointer" @click="cliclCaozuo(2,item)">
                  生成模板
                </div>
                <div class="selects" style="cursor: pointer" @click="cliclCaozuo(3, item)">
                  更换通道
                </div>
                <div class="selects" v-if="item.needUpdate">版本升级</div>
              </div>
              <!-- 通道正常测点 -->
              <div class="caozuo caozuo2" v-if="showDetail == item && showNum == 1 && item.normalNum > 0"
                @mouseleave="(showDetail = null), (showNum = null)">
                <div class="selects2">
                  正常测点
                  <span style="color: #67c23a">{{ item.normalNum }}</span>
                </div>
                <div class="selects2 selects3" style="cursor: pointer"
                  @click="openPointEdit(item2), clicksSub(item, index)" @mouseover="pointIndex = index2"
                  v-for="(item2, index2) in stationPoint" :key="item2" :class="{ hover: pointIndex == index2 }">
                  <span>{{ item2.pointId }}</span>
                </div>
              </div>
              <!-- 通道异常测点 -->
              <div class="caozuo caozuo2 caozuo3" v-if="showDetail == item && showNum == 2 && item.errorNum > 0"
                @mouseleave="(showDetail = null), (showNum = null)">
                <div class="selects2">
                  测点异常
                  <span style="color: #f56c6c">{{ item.errorNum }}</span>
                </div>
                <div class="pointS" style="cursor: pointer" @click="openPointEdit(item2), clicksSub(item, index)"
                  @mouseover="pointIndex = index2" v-for="(item2, index2) in stationPoint" :key="item2"
                  :class="{ hover: pointIndex == index2 }">
                  <span :title="item2.pointId" :style="{ width: '77px' }">{{
                    item2.pointId
                  }}</span>
                  <span :title="item2.sensorName.split('/')[1]"
                    v-if="item2.sensorName.includes('/')">{{ item2.sensorName.split("/")[1] }}</span>
                  <span :title="item2.sensorName" v-else>{{
                    item2.sensorName
                  }}</span>
                  <span :title="item2.statusName" style="color: #f56c6c">{{
                    item2.statusName
                  }}</span>
                </div>
              </div>
              <!-- 通道未分配测点 -->
              <div class="caozuo caozuo2" v-if="showDetail == item && showNum == 3 && item.unUsedNum > 0"
                @mouseleave="(showDetail = null), (showNum = null)">
                <div class="selects2">
                  未分配测点
                  <span style="color: #49a6f2; margin: 0">{{
                    item.unUsedNum
                  }}</span>
                </div>
                <div class="selects2 hover selects3" style="cursor: pointer" @click="clicksSub(item, index)">
                  <span style="color: #49a6f2">去分配</span>
                </div>
              </div>
              <!-- 异常说明 -->
              <div class="yc_show" v-if="showYichang == item" @mouseleave="showYichang = null">
                <div class="selects2" v-for="it in item.colorDescList" :key="it">
                  <img v-if="item.color == '橙色'" src="@/assets/images/异常.svg" alt="" class="yc" />
                  <img v-if="item.color == '红色'" src="@/assets/images/报警.svg" alt="" class="yc" />
                  {{ it }}
                </div>
              </div>
            </div>
            <div class="nodata2" v-if="subStationList.length == 0">
              <img src="@/assets/images/tabnopoint.png" alt="" />
              <div>暂无数据</div>
            </div>
          </div>
        </div>
        <div class="deviceList" :class="{ hiddDev: hiddDev }">
          <div class="list_head" v-if="!hiddDev">
            <div class="title">
              <svg-icon icon-class="biaotitubiao" />
              <div style="margin: 0 0 0 8px">设备列表</div>
            </div>
            <div class="filter">
              <el-cascader v-if="!showInput2" v-model="form2.pointAreaId" :props="props" :show-all-levels="false"
                :options="areaList" clearable @change="handleChange2" size="small"
                style="width: 100px; margin: 0 20px 0 0" placeholder="请选择区域" />
              <el-select v-if="!showInput2" v-model="form2.status" size="small" style="width: 122px"
                @change="handleChange4" placeholder="请选择测点状态">
                <el-option v-for="item in filerArr2" :key="item.value" :label="item.label" :value="item.value" />
              </el-select>
              <svg-icon style="margin: 0 8px 0 20px; cursor: pointer" v-if="!showInput2" @click="openSearch2"
                icon-class="sousuo" />
              <el-input v-if="showInput2" v-model="form2.key" style="width: 160px; margin: 0 8px 0 20px" size="small"
                placeholder="请输入" suffix-icon="Search" clearable ref="input2" @change="getDevtList"
                @blur="showInput2 = false" />
              <svg-icon @click="hiddDevice" icon-class="zhankaisy" />
            </div>
          </div>
          <div class="list_box" v-if="!hiddDev">
            <div class="btns">
              <el-radio-group v-model="tabPosition">
                <el-radio-button label="1">待确认{{ realPlugs.length }}</el-radio-button>
                <el-radio-button label="2">已确认 {{ devList.length }}</el-radio-button>
              </el-radio-group>
              <div class="shuaxin" v-if="tabPosition == 1" @click="getDevs">
                <svg-icon icon-class="shuaxin" style="margin: 0 8px 0 0" />
                刷新
              </div>
            </div>
            <div v-if="tabPosition == 1" style="height: calc(100% - 32px); overflow: auto">
              <div class="nodata" v-if="realPlugs.length == 0">
                <img src="@/assets/images/空白.png" alt="" />
                未搜索到设备哦~
              </div>
              <div class="items" v-for="item in realPlugs" :key="item" style="
                  background-color: #f9f9fa;
                  margin: 0 0 10px 0;
                  border-radius: 4px;
                ">
                <div class="one">
                  安装地点
                  <div style="width: 308px">
                    <el-select size="small" style="width: 100%" clearable filterable allow-create
                      v-model="item.plugPlace" placeholder="请选择">
                      <el-option v-for="item in addressInfoList" :key="item.id" :label="item.placeName"
                        :value="item.id">
                      </el-option>
                    </el-select>
                  </div>
                </div>
                <div class="two">
                  <div style="width: 56px; display: flex; justify-content: center">
                    <img v-if="!item.pointId.includes('V')" src="@/assets/images/pointImg.png" style="width: 18px"
                      alt="" />
                  </div>
                  <div v-if="item.pointId.includes('V')" class="vName">
                    虚拟
                  </div>
                  <el-tag class="tags" v-if="item.pointId.includes('A')">模拟量</el-tag>
                  <el-tag class="tags" v-if="item.pointId.includes('D')">开关量</el-tag>
                  <el-tag class="tags" v-if="item.pointId.includes('S')">累计量</el-tag>
                  <el-tag class="tags" v-if="item.pointId.includes('M')">多参量</el-tag>
                  <el-tag class="tags" v-if="item.pointId.includes('V')">虚拟量</el-tag>
                  <div class="two_info">
                    <div class="info1">
                      <div :title="item.childIndexName">
                        【{{ item.pointId }}】{{ item.childIndexName }}
                      </div>
                    </div>
                    <div class="info2">
                      <div>软件版本</div>
                      <div v-if="item.pointVersion">
                        {{ item.pointVersion }}
                      </div>
                      <div v-if="!item.pointVersion">--</div>
                    </div>
                    <svg-icon icon-class="xinzeng-tianchong" @click="addPlugDev(item)" />
                    <!-- <img src="@/assets/images/添加.svg" alt="" /> -->
                  </div>
                </div>
              </div>
            </div>
            <div v-if="tabPosition == 2" style="height: calc(100% - 32px); overflow: auto">
              <div class="items" v-for="item in devList" :key="item">
                <div class="one">
                  安装地点
                  <div style="width: 308px">{{ item.pointPlaceName }}</div>
                </div>
                <div class="two">
                  <img v-if="!item.pointId.includes('V')" :src="item.sensorImagePath" alt="" />
                  <div v-if="item.pointId.includes('V')" class="vName">
                    虚拟
                  </div>
                  <el-tag class="tags" v-if="item.pointId.includes('A')">模拟量</el-tag>
                  <el-tag class="tags" v-if="item.pointId.includes('D')">开关量</el-tag>
                  <el-tag class="tags" v-if="item.pointId.includes('S')">累计量</el-tag>
                  <el-tag class="tags" v-if="item.pointId.includes('M')">多参量</el-tag>
                  <el-tag class="tags" v-if="item.pointId.includes('V')">虚拟量</el-tag>
                  <div class="two_info">
                    <div class="info1">
                      <div :title="item.sensorName">
                        【{{ item.pointId }}】{{ item.sensorName }}
                      </div>
                      <div>
                        <span>{{ item.pointValue }}</span> {{ item.sensorUnit }}
                      </div>
                    </div>
                    <div class="info2">
                      <div>设备唯一编号</div>
                      <div v-if="item.pointIdentifyingNo">
                        {{ item.pointIdentifyingNo }}
                      </div>
                      <div v-if="!item.pointIdentifyingNo">--</div>
                    </div>
                    <!-- <img src="@/assets/images/添加.svg" alt="" /> -->
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="ceDianList" v-if="showcedian">
          <div class="cd_head">
            <el-radio-group v-model="tabPosition2" @change="tabChange">
              <el-radio-button label="1">测点 {{ pointNum.length }}</el-radio-button>
              <el-radio-button label="2">电源测点 {{ powerPoints.length }}</el-radio-button>
              <el-radio-button label="3">开出口 {{ controlNum.length }}</el-radio-button>
            </el-radio-group>
            <div class="filter">
              <el-select v-model="form_point.status" size="small" style="width: 125px" v-if="tabPosition2 == 1"
                @change="handleChange5" placeholder="请选择测点状态">
                <el-option v-for="item in filerArr2" :key="item.value" :label="item.label" :value="item.value" />
              </el-select>
              <svg-icon style="margin: 0 8px 0 20px; cursor: pointer" v-if="!showInput3 && tabPosition2 == 1"
                @click="openSearch3" icon-class="sousuo" />
              <el-input @change="handleChange6" v-if="showInput3" v-model="form_point.key"
                style="width: 160px; margin: 0 8px 0 20px" size="small" placeholder="输入编号、位置等" suffix-icon="Search"
                clearable ref="input3" @blur="showInput3 = false" />
              <svg-icon style="margin: 0 8px 0 20px; cursor: pointer;" v-if="tabPosition2 == 1 && userStore.modify && pointNoList.length>0 
              "
                @click="addPointFn(1, null)" icon-class="xinzeng" />
              <div v-if="userStore.modify &&  tabPosition2 == 1 || tabPosition2 == 2" @click="useTemp"
                style="cursor: pointer">
                <svg-icon icon-class="moban" />
                使用模板
              </div>
            </div>
          </div>
          <div class="cd_box" v-if="tabPosition2 == 1">
            <div class="items" v-for="item in pointList" :key="item">
              <div class="num" :class="{ num2: !item.pointCode }">
                {{ item.pointCode }}
              </div>
              <div class="cgq_img" v-if="item.pointId != null">
                <img v-if="!item.pointId.includes('V') && item.sensorImagePath" :src="item.sensorImagePath" alt="" />
                <img v-if="!item.pointId.includes('V') && !item.sensorImagePath" src="@/assets/images/pointImg.png"
                  style="width: 16px" alt="" />
                <div v-if="item.pointId.includes('V')" class="vName">虚拟</div>
              </div>
              <div class="items_info" v-if="item.pointId != null">
                <div class="one" @click="openPointEdit(item)">
                  {{ item.pointId }} {{ item.pointPlaceName }}
                </div>
                <div class="two">
                  <el-tag v-if="
                      item.sensorTypeName == '开关量' ||
                      item.sensorTypeName == '累计量'
                    " style="height: 16px; margin: 0 8px 0 0">{{ item.sensorTypeName }}</el-tag>
                  <el-tag v-if="item.sensorTypeName == '模拟量'" style="
                      height: 16px;
                      margin: 0 8px 0 0;
                      color: #7777ee;
                      border-color: #7777ee;
                    " color="rgba(119, 119, 238, 0.1)">{{ item.sensorTypeName }}</el-tag>
                  <el-tag v-if="item.sensorTypeName != '累计量'" :type="item.isAlarm ? '' : 'info'"
                    style="height: 16px; margin: 0 8px 0 0" @click="openPointEdit(item, 1)">报警配置 +</el-tag>
                  <el-tag v-if="
                      item.sensorTypeName != '累计量' && item.needGrandalarm
                    " :type="item.isGrand ? '' : 'info'" style="height: 16px; margin: 0 8px 0 0"
                    @click="openPointEdit(item, 2)">分级报警 +</el-tag>
                  <el-tag v-if="
                      item.sensorTypeName != '累计量' &&
                      !item.pointId.includes('V')&&item.isCut!=null
                    " :type="item.isCut ? '' : 'info'" style="height: 16px" @click="openPointEdit(item, 3)">断电配置 +
                  </el-tag>
                </div>
              </div>
              <div style="width: 300px">
                <el-tag effect="dark" v-if="item.statusName == '正常' && item.pointId != null" type="success"
                  style="height: 16px">{{ item.statusName }}</el-tag>
                <el-tag effect="dark" v-else-if="
                    item.statusName == '待下发' && item.pointId != null
                  " type="primary" style="height: 16px">{{ item.statusName }}</el-tag>
                <el-tag effect="dark" v-else-if="item.statusName == '断线' && item.pointId != null" type="info"
                  style="height: 16px">{{ item.statusName }}</el-tag>
                <el-tag effect="dark" v-else-if="
                    item.pointId != null &&
                    item.statusName != null &&
                    !item.statusName.includes(',')
                  " type="danger" style="height: 16px">{{ item.statusName }}</el-tag>
                <div v-else-if="
                    item.pointId != null &&
                    item.statusName != null &&
                    item.statusName.includes(',')
                  ">
                  <el-tag effect="dark" v-for="it in item.statusName.split(',')" :key="it" type="danger"
                    style="height: 16px; margin: 0 5px 0 0">{{ it }}</el-tag>
                </div>
              </div>
              <div class="data" v-if="item.pointId != null">
                <div>{{ item.sensorName }}</div>
                <div v-if="item.pointValue">
                  <span :style="{
                      color:
                        item.statusName != '正常' && item.statusName != '待下发'
                          ? '#f56c6c'
                          : '',
                    }" style="margin: 0 5px 0 0">{{ item.pointValue }}</span>{{ item.sensorUnit }}
                </div>
                <div v-else>-</div>
              </div>
              <div class="btn" v-if="item.needConfirm && item.pointId != null">
                确认
              </div>
              <div class="btn zhijian" v-if="item.statusName == '异常' && item.pointId != null">
                智检
              </div>
              <div class="btn2" v-if="
                  !item.needConfirm &&
                  item.statusName != '异常' &&
                  item.pointId != null
                "></div>
              <div class="add" @click="addPointFn(null, item)" v-if="item.pointId == null">
                <el-icon color="#409eff">
                  <Plus />
                </el-icon>添加
              </div>
              <div class="type_box" v-if="showPointAdd == item" @mouseleave="showPointAdd = null">
                <div class="t_item" @click="
                    open_addPoint(1, subStationInfo.stationCode, item.pointCode)
                  ">
                  新增普通测点
                </div>
                <div class="t_item" @click="open_addPoint(3, subStationInfo.stationCode)">
                  新增虚拟测点
                </div>
                <div class="t_item" @click="
                    open_addPoint(2, subStationInfo.stationCode, item.pointCode)
                  ">
                  新增多参测点
                </div>
              </div>
            </div>
            <div class="type_box newPos" v-if="showPointAdd2 == true" @mouseleave="showPointAdd2 = false">
              <div class="t_item" @click="open_addPoint(1, subStationInfo.stationCode)">
                新增普通测点
              </div>
              <div class="t_item" @click="open_addPoint(3, subStationInfo.stationCode)">
                新增虚拟测点
              </div>
              <div class="t_item" @click="open_addPoint(2, subStationInfo.stationCode)">
                新增多参测点
              </div>
            </div>
          </div>
          <div class="cd_box" v-if="tabPosition2 == 2">
            <div class="items" v-for="item in powerPointsList" :key="item">
              <div class="num" :class="{ num2: !item.pointCode }">
                {{ item.pointCode }}
              </div>
              <div class="cgq_img" v-if="item.pointId != null">
                <img v-if="!item.pointId.includes('V') && item.sensorImagePath" :src="item.sensorImagePath" alt="" />
                <img v-if="!item.pointId.includes('V') && !item.sensorImagePath" src="@/assets/images/pointImg.png"
                  style="width: 16px" alt="" />
                <div v-if="item.pointId.includes('V')" class="vName">虚拟</div>
              </div>
              <div class="items_info" v-if="item.pointId != null">
                <div class="one" @click="openPointEdit(item)">
                  {{ item.pointId }} {{ item.pointPlaceName }}
                </div>
                <div class="two">
                  <el-tag v-if="
                      item.sensorTypeName == '开关量' ||
                      item.sensorTypeName == '累计量'
                    " style="height: 16px; margin: 0 8px 0 0">{{ item.sensorTypeName }}</el-tag>
                  <el-tag v-if="item.sensorTypeName == '模拟量'" style="
                      height: 16px;
                      margin: 0 8px 0 0;
                      color: #7777ee;
                      border-color: #7777ee;
                    " color="rgba(119, 119, 238, 0.1)">{{ item.sensorTypeName }}</el-tag>
                  <el-tag v-if="item.sensorTypeName != '累计量'" :type="item.isAlarm ? '' : 'info'"
                    style="height: 16px; margin: 0 8px 0 0" @click="openPointEdit(item, 1)">报警配置 +</el-tag>
                </div>
              </div>
              <div style="width: 300px">
                <el-tag effect="dark" v-if="item.statusName == '正常' && item.pointId != null" type="success"
                  style="height: 16px">{{ item.statusName }}</el-tag>
                <el-tag effect="dark" v-else-if="
                    item.statusName == '待下发' && item.pointId != null
                  " type="primary" style="height: 16px">{{ item.statusName }}</el-tag>
                <el-tag effect="dark" v-else-if="item.statusName == '断线' && item.pointId != null" type="info"
                  style="height: 16px">{{ item.statusName }}</el-tag>
                <el-tag effect="dark" v-else-if="
                    item.pointId != null &&
                    item.statusName != null &&
                    !item.statusName.includes(',')
                  " type="danger" style="height: 16px">{{ item.statusName }}</el-tag>
                <div v-else-if="
                    item.pointId != null &&
                    item.statusName != null &&
                    item.statusName.includes(',')
                  ">
                  <el-tag effect="dark" v-for="it in item.statusName.split(',')" :key="it" type="danger"
                    style="height: 16px; margin: 0 5px 0 0">{{ it }}</el-tag>
                </div>
              </div>
              <div class="data" v-if="item.pointId != null">
                <div>{{ item.sensorName }}</div>
                <div v-if="item.pointValue">
                  <span :style="{
                      color:
                        item.statusName != '正常' && item.statusName != '待下发'
                          ? '#f56c6c'
                          : '',
                    }" style="margin: 0 5px 0 0">{{ item.pointValue }}</span>{{ item.sensorUnit }}
                </div>
                <div v-else>-</div>
              </div>
              <div class="btn" v-if="item.needConfirm && item.pointId != null">
                确认
              </div>
              <div class="btn zhijian" v-if="item.statusName == '异常' && item.pointId != null">
                智检
              </div>
              <div class="btn2" v-if="
                  !item.needConfirm &&
                  item.statusName != '异常' &&
                  item.pointId != null
                "></div>
              <div class="add" @click="addPointFn(null, item)" v-if="item.pointId == null">
                <el-icon color="#409eff">
                  <Plus />
                </el-icon>添加
              </div>
              <div class="type_box" v-if="showPointAdd == item" @mouseleave="showPointAdd = null">
                <div class="t_item" @click="
                    open_addPoint(1, subStationInfo.stationCode, item.pointCode)
                  ">
                  新增普通测点
                </div>
                <div class="t_item" @click="open_addPoint(3, subStationInfo.stationCode)">
                  新增虚拟测点
                </div>
                <div class="t_item" @click="
                    open_addPoint(2, subStationInfo.stationCode, item.pointCode)
                  ">
                  新增多参测点
                </div>
              </div>
            </div>
            <div class="type_box newPos" v-if="showPointAdd2 == true" @mouseleave="showPointAdd2 = false">
              <div class="t_item" @click="open_addPoint(1, subStationInfo.stationCode)">
                新增普通测点
              </div>
              <div class="t_item" @click="open_addPoint(3, subStationInfo.stationCode)">
                新增虚拟测点
              </div>
              <div class="t_item" @click="open_addPoint(2, subStationInfo.stationCode)">
                新增多参测点
              </div>
            </div>
          </div>
          <div class="cd_box" v-if="tabPosition2 == 3">
            <div class="items items2" v-for="(item, index) in controlPorts" :key="item">
              <div class="num">{{ index + 1 }}</div>
              <div class="infos infos1" v-if="item.controlPortType != null">
                <div class="one">控制设备</div>
                <div class="two">
                  {{ item.controlPortTypeName }}
                </div>
              </div>
              <div class="infos infos2" v-if="item.controlPortType != null">
                <div class="one">安装地点</div>
                <div class="two">
                  {{ item.pointPlaceName }}
                </div>
              </div>
              <div class="infos infos3" v-if="item.controlPortType != null">
                <div class="one">馈电测点</div>
                <div class="two" v-if="item.feedPointId != null">
                  {{ item.feedPointId }}/{{ item.feedSensorName }}/{{
                    item.pointPlaceName
                  }}
                </div>
                <div class="two" v-if="item.feedPointId == null">-</div>
              </div>
              <div class="infos" v-if="item.controlPortType != null">
                <div class="one">地理位置</div>
                <div class="two" style="width: 300px; white-space: nowrap" v-if="item.locationX != null">
                  X:{{ item.locationX }} Y:{{ item.locationY }} Z:{{
                    item.locationZ
                  }}
                </div>
                <div class="two" style="width: 300px; white-space: nowrap" v-if="item.locationX == null">
                  -
                </div>
              </div>
              <div class="xq" v-if="item.controlPortType != null" @click="openControlPorts(item)">
                详情
              </div>
              <div v-if="item.controlPortType == null && userStore.modify" class="add" @click="openControlPorts(item)">
                <el-icon color="#409eff">
                  <Plus />
                </el-icon>新增
              </div>
            </div>
          </div>
        </div>
      </div>
      <!-- 分站查看详情 -->
      <el-drawer v-model="open_detail" custom-class="detail" close-on-click-modal :modal="true">
        <template #header>
          <div class="d_header">
            <div class="title">
              <svg-icon icon-class="biaotitubiao" />
              <div style="margin: 0 0 0 8px">
                {{ subStationInfo.stationCode }}
              </div>
            </div>
          </div>
        </template>
        <template #default>
          <div class="detail_box">
            <div class="basic_info">
              <div class="location">
                <svg-icon style="margin: 0 4px 0 0" icon-class="anzhuangdidian" />
                {{ subStationInfo.stationPlaceName }}
              </div>
              <div class="line"></div>
              <div class="info_data">
                <div class="img_box">
                  <img :src="subStationInfo.stationTypeImagePath" alt="" />
                  <div class="name">{{ subStationInfo.stationTypeName }}</div>
                  <div class="vision">{{ subStationInfo.stationVersion }}</div>
                </div>
                <div class="data_box">
                  <div class="data_row">
                    <div class="data_item" style="margin: 0 70px 0 0">
                      <div class="item_title">输入口数量/开出口数量</div>
                      <div>
                        {{ subStationInfo.stationInNum }}/{{
                          subStationInfo.stationOutNum
                        }}
                      </div>
                    </div>
                    <div class="data_item" style="margin: 0 160px 0 0">
                      <div class="item_title">分站模式</div>
                      <div>{{ subStationInfo.stationModelName }}</div>
                    </div>
                    <div class="data_item">
                      <div class="item_title">IP:端口</div>
                      <div>
                        {{ subStationInfo.ipAddr }}:{{ subStationInfo.ipPort }}
                      </div>
                    </div>
                  </div>
                  <div class="data_row">
                    <div class="data_item" style="margin: 0 107px 0 0">
                      <div class="item_title">通道</div>
                      <div style="color: rgba(64, 158, 255, 1)">
                        {{ subStationInfo.channelNo }}(巡检周期:10秒)
                      </div>
                    </div>
                    <div class="data_item" style="margin: 0 160px 0 0">
                      <div class="item_title">所在区域</div>
                      <div>{{ subStationInfo.stationAreaName }}</div>
                    </div>
                    <div class="data_item">
                      <div class="item_title">安装时刻</div>
                      <div>{{ subStationInfo.createTime }}</div>
                    </div>
                  </div>
                  <div class="data_row">
                    <div class="data_item" style="margin: 0 120px 0 0">
                      <div class="item_title">设备唯一编号</div>
                      <div>{{ subStationInfo.identifyingNo }}</div>
                    </div>
                    <div class="data_item">
                      <div class="item_title">应用场景</div>
                      <div>{{ subStationInfo.applicationScene }}</div>
                    </div>
                  </div>
                  <div class="data_row">
                    <div class="data_item">
                      <div class="item_title">地理位置</div>
                      <div style="color: rgba(64, 158, 255, 1)" v-if="subStationInfo.locationX">
                        {{ subStationInfo.locationX }}，{{
                          subStationInfo.locationY
                        }}，{{ subStationInfo.locationZ }}
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="others">
              <el-tabs v-model="activeName" class="demo-tabs">
                <el-tab-pane name="1">
                  <template #label>
                    <div class="custom-tabs-label">
                      <span>关联电源</span>
                      <img src="@/assets/images/校验.svg" alt="" v-if="stationPowerList.length > 0" />
                    </div>
                  </template>
                  <el-collapse v-model="powerActive" accordion>
                    <el-collapse-item :title="item.powerName" :name="index" v-for="(item, index) in stationPowerList"
                      :key="item">
                      <div class="tabs_box one">
                        <div class="data_row">
                          <div class="data_item">
                            <div class="item_title" style="color: rgba(62, 70, 79, 1)">
                              {{ item.powerName }}
                            </div>
                            <div>
                              <el-tag effect="dark" :type="
                                  item.electricType == '直流电'
                                    ? 'success'
                                    : 'danger'
                                " style="width: 44px; height: 16px">{{ item.electricType }}</el-tag>
                            </div>
                          </div>
                          <div class="data_item">
                            <div class="item_title">电源状态</div>
                            <div style="color: rgba(64, 158, 255, 1)">
                              {{ item.powerStatus }}
                            </div>
                          </div>
                          <div class="data_item">
                            <div class="item_title">电源类型</div>
                            <div>{{ item.powerTypeName }}</div>
                          </div>
                          <div class="data_item">
                            <div class="item_title">电源号</div>
                            <div>{{ item.powerNo }}</div>
                          </div>
                          <div style="width: 46px"></div>
                        </div>
                        <div class="data_row">
                          <div class="data_item">
                            <div class="item_title">最近充电时刻</div>
                            <div>{{ item.chargeTime }}</div>
                          </div>
                          <div class="data_item">
                            <div class="item_title">最近充电时长</div>
                            <div>{{ item.chargePeriod }}</div>
                          </div>
                          <div class="data_item">
                            <div class="item_title">最近放电时刻</div>
                            <div>{{ item.dischargeTime }}</div>
                          </div>
                          <div class="data_item">
                            <div class="item_title">最近放电时长</div>
                            <div>{{ item.dischargePeriod }}</div>
                          </div>
                          <div style="width: 46px"></div>
                        </div>
                        <div class="data_row">
                          <div class="data_item">
                            <div class="item_title">历史充放电</div>
                            <div style="color: rgba(64, 158, 255, 1)" @click="hiscfdClick(item)">
                              查看
                            </div>
                          </div>
                          <div class="data_item">
                            <div class="item_title">关联测点</div>
                            <div style="color: rgba(64, 158, 255, 1)" @click="connectPowerClick(item)">
                              查看
                            </div>
                          </div>
                          <div class="data_item">
                            <div class="item_title">放电时刻门限</div>
                            <div>{{ item.timeThreshold }}</div>
                          </div>
                          <div class="data_item">
                            <div class="item_title">容量门限</div>
                            <div>{{ item.capacityThreshold }}</div>
                          </div>
                          <div style="width: 46px"></div>
                        </div>
                        <div class="data_row">
                          <div class="data_item">
                            <div class="item_title">电源路数</div>
                            <div>{{ item.powerWay }}</div>
                          </div>
                          <div class="data_item">
                            <div class="item_title">程序版本</div>
                            <div>{{ item.powerVersion }}</div>
                          </div>
                          <div class="data_item">
                            <div class="item_title">安装时刻</div>
                            <div>{{ item.createTime }}</div>
                          </div>
                          <div class="data_item"></div>
                          <div style="width: 46px"></div>
                        </div>
                      </div>
                      <vxe-modal esc-closable destroy-on-close :lock-view="false" :width="1460" :height="700"
                        v-model="state.hisCFDListaddModal" resize :mask="true" showFooter>
                        <template #title>
                          <div class="w100 h100 fsc mask_title">历史充放电</div>
                        </template>
                        <template #default>
                          <component :is="hisCFDList" :frompointConfigObj="state.frompointConfigObj" />
                        </template>
                      </vxe-modal>
                      <vxe-modal esc-closable destroy-on-close :lock-view="false" :width="660" :height="auto"
                        v-model="state.connectPoweraddModal" resize :mask="true" showFooter>
                        <template #title>
                          <div class="w100 h100 fsc mask_title">关联测点</div>
                        </template>
                        <template #default>
                          <div>
                            <vxe-table height="500" :data="state.connectPowerpointsList" border="inner">
                              <vxe-column type="seq" :width="55" title="序号"></vxe-column>
                              <vxe-column title="测点号" field="pointId"></vxe-column>
                              <vxe-column title="测点名称" field="sensorName"></vxe-column>
                              <vxe-column title="安装地点" field="pointPlaceName"></vxe-column>
                            </vxe-table>
                          </div>
                        </template>
                      </vxe-modal>
                    </el-collapse-item>
                  </el-collapse>
                </el-tab-pane>
                <el-tab-pane label="其他配置" name="2">
                  <div class="tabs_box two">
                    <div class="items">
                      <div>
                        无主断电
                        <el-tooltip effect="dark" content="测点可在脱离上位机控制的情况下，根据实时监测结果自主触发断电操作。" placement="right">
                          <el-icon color="#e8a847">
                            <InfoFilled />
                          </el-icon>
                        </el-tooltip>
                      </div>
                      <el-switch v-model="subStationInfo.isPlaceotherBreakfalg" disabled />
                    </div>
                    <div class="items">
                      <div>
                        瓦斯抽放
                        <el-tooltip effect="dark" content="分站下的测点支持参与瓦斯抽放量的计算。" placement="right">
                          <el-icon color="#e8a847">
                            <InfoFilled />
                          </el-icon>
                        </el-tooltip>
                      </div>
                      <el-switch v-model="subStationInfo.isGasDrainage" disabled />
                    </div>
                    <div class="items">
                      <div>
                        以太网
                        <el-tooltip effect="dark" content="分站支持以太网通讯方式，相较于RS485通讯，以太网具有更高的数据传输速率、更低的延迟和更好的稳定性"
                          placement="right">
                          <el-icon color="#e8a847">
                            <InfoFilled />
                          </el-icon>
                        </el-tooltip>
                      </div>
                      <el-switch v-model="subStationInfo.isNetwork" disabled />
                    </div>
                    <div class="items">
                      <div>
                        禁止非即插即用传感器
                        <el-tooltip effect="dark" content="分站强制禁止使用旧协议进行通讯，避免因协议版本不一致导致的数据错乱或安全隐患。" placement="right">
                          <el-icon color="#e8a847">
                            <InfoFilled />
                          </el-icon>
                        </el-tooltip>
                      </div>
                      <el-switch v-model="subStationInfo.noOldprotocolSensor" disabled />
                    </div>
                    <div class="items">
                      <div>
                        续传
                        <el-tooltip effect="dark" content="当分站在通讯故障恢复后，支持将故障期间所记录的历史数据上传至上位机，确保数据完整性与事件追溯能力。"
                          placement="right">
                          <el-icon color="#e8a847">
                            <InfoFilled />
                          </el-icon>
                        </el-tooltip>
                      </div>
                      <el-switch v-model="subStationInfo.continuation" disabled />
                    </div>
                    <div class="items">
                      <div>
                        测点断线断电
                        <el-tooltip effect="dark" content="当测点发生断线时，系统自动触发断电保护，以确保相关设备停止运行，避免潜在危险。" placement="right">
                          <el-icon color="#e8a847">
                            <InfoFilled />
                          </el-icon>
                        </el-tooltip>
                      </div>
                      <el-switch v-model="subStationInfo.pointCutBroken" disabled />
                    </div>
                    <div class="items">
                      <div>
                        RS485断电器断线断电
                        <el-tooltip effect="dark" content="在RS485断电器发生线路断开或故障时，系统自动触发断电保护，以切断相关设备的电源，防止安全隐患。"
                          placement="right">
                          <el-icon color="#e8a847">
                            <InfoFilled />
                          </el-icon>
                        </el-tooltip>
                      </div>
                      <el-switch v-model="subStationInfo.rsBreakerState" />
                    </div>
                  </div>
                </el-tab-pane>
                <el-tab-pane label="操作日志" name="3">
                  <div class="tabs_box three">
                    <div class="three_header">
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">操作模块</div>
                        <el-input v-model="input" clearable style="width: 82px" placeholder="请输入" />
                      </div>
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">操作人</div>
                        <el-select v-model="value" clearable placeholder="请选择" style="width: 82px">
                          <el-option v-for="item in options" :key="item.value" :label="item.label"
                            :value="item.value" />
                        </el-select>
                      </div>
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">时刻</div>
                        <el-date-picker clearable style="width: 320px" v-model="value2" type="datetimerange"
                          :shortcuts="shortcuts" range-separator="-" start-placeholder="开始时间" end-placeholder="结束时间" />
                      </div>
                      <div class="btns">
                        <el-button type="primary" style="width: 64px">查询</el-button>
                        <el-button style="width: 64px">重置</el-button>
                      </div>
                    </div>
                    <el-table :data="tableData" stripe class="table" :header-row-style="{ backgroundColor: '#e3effe' }"
                      :header-cell-style="{
                        backgroundColor: '#e3effe !important',
                      }" max-height="256px">
                      <el-table-column show-overflow-tooltip prop="address" label="操作时刻" />
                      <el-table-column show-overflow-tooltip prop="work" label="操作类型" />
                      <el-table-column show-overflow-tooltip prop="pipei" label="操作模块" />
                      <el-table-column show-overflow-tooltip prop="pipei" label="操作内容" />
                      <el-table-column show-overflow-tooltip prop="pipei" label="操作结果" />
                      <el-table-column show-overflow-tooltip prop="pipei" label="操作人" />
                    </el-table>
                  </div>
                </el-tab-pane>
              </el-tabs>
            </div>
          </div>
        </template>
        <template #footer>
          <div class="footer_btns" v-if="userStore.modify">
            <div>
              <el-button type="danger" @click="delStation(subStationInfo)">删除节点</el-button>
            </div>
            <div>
              <el-button @click="open_detail = false">取消</el-button>
              <el-button type="primary" @click="open_editModal">编辑</el-button>
            </div>
          </div>
        </template>
      </el-drawer>
      <!-- 分站新增 -->
      <el-drawer v-model="open_add" custom-class="edit" @close="form_add = {}" close-on-click-modal :modal="true">
        <template #header>
          <div class="d_header">
            <div class="title">
              <svg-icon icon-class="biaotitubiao" />
              <div style="margin: 0 0 0 8px">分站</div>
            </div>
          </div>
        </template>
        <template #default>
          <div class="edit_box">
            <div class="basic_info">
              <el-form :model="form_add" label-width="auto" label-position="top" :rules="rules" ref="formA">
                <el-row :gutter="16">
                  <el-col :span="6">
                    <el-form-item label="分站编号" prop="stationCode">
                      <div class="data_item">
                        <el-select style="width: 200px" clearable filterable v-model="form_add.stationCode"
                          placeholder="请选择">
                          <el-option v-for="item in ationNosList" :key="item" :label="item" :value="item">
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="分站类型" prop="stationTypeId">
                      <div class="data_item">
                        <el-select style="width: 200px" clearable filterable v-model="form_add.stationTypeId"
                          placeholder="请选择" @change="stationTypeChange">
                          <el-option v-for="item in substationType" :key="item.id" :label="item.stationTypeName"
                            :value="item.id">
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="输入口数量">
                      <div class="data_item">
                        <el-input disabled v-model="form_add.stationInNum" style="width: 200px" placeholder="请输入" />
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="分站模式">
                      <div class="data_item">
                        <el-input disabled v-model="form_add.stationModelName" style="width: 200px" placeholder="请输入" />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="12">
                    <el-form-item label="安装地点" prop="stationPlaceName">
                      <div class="data_item">
                        <el-select clearable filterable allow-create style="width: 416px"
                          v-model="form_add.stationPlaceName" placeholder="请选择">
                          <el-option v-for="item in addressInfoList" :key="item.id" :label="item.placeName"
                            :value="item.placeName">
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="所在区域" prop="stationAreaId">
                      <div class="data_item">
                        <el-cascader v-model="form_add.stationAreaId" style="width: 416px" :options="searchTreeList"
                          clearable :props="{
                            children: 'childList',
                            value: 'id',
                            label: 'areaName',
                            emitPath: false,
                            checkStrictly: true,
                          }" />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="6">
                    <el-form-item label="IP" prop="ipAddr">
                      <div class="data_item">
                        <el-input v-model="form_add.ipAddr" style="width: 200px" placeholder="请输入" />
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="端口" prop="ipPort">
                      <div class="data_item">
                        <el-input v-model="form_add.ipPort" style="width: 200px" placeholder="请输入" />
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="通道号">
                      <div class="data_item">
                        <el-select class="w100" filterable allow-create v-model="form_add.channelNo" placeholder="请选择"
                          @change="channelNoChange">
                          <el-option v-for="item in channelNoList" :key="item.id" :label="item.name" :value="item.id">
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="设备唯一编号">
                      <div class="data_item">
                        <el-input v-model="form_add.identifyingNo" style="width: 200px" placeholder="请输入" />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="12">
                    <el-form-item>
                      <div class="data_item">
                        <div>
                          地理位置
                          <span style="color: rgba(64, 158, 255, 1)">GIS获取</span>
                        </div>
                        <div class="fbc">
                          <el-input v-model="form_add.locationX" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
  '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
  .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
  .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                            <template #prefix>
                              <span>X</span>
                            </template>
                          </el-input>
                          <el-input v-model="form_add.locationY" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
  '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
  .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
  .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                            <template #prefix>
                              <span>Y</span>
                            </template>
                          </el-input>
                          <el-input v-model="form_add.locationZ" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
  '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
  .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
  .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                            <template #prefix>
                              <span>Z</span>
                            </template>
                          </el-input>
                        </div>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12"> </el-col>
                </el-row>
              </el-form>
            </div>
            <div class="others">
              <el-tabs v-model="activeName" class="demo-tabs2">
                <el-tab-pane label="其他配置" name="2">
                  <div class="tabs_box two">
                    <div class="items">
                      <div>无主断电</div>
                      <el-switch v-model="form_add.isPlaceotherBreakfalg" />
                    </div>
                    <div class="items">
                      <div>瓦斯抽放</div>
                      <el-switch v-model="form_add.isGasDrainage" />
                    </div>
                    <div class="items">
                      <div>以太网</div>
                      <el-switch v-model="form_add.isNetwork" />
                    </div>
                    <div class="items">
                      <div>禁止非即插即用传感器</div>
                      <el-switch v-model="form_add.noOldprotocolSensor" />
                    </div>
                    <div class="items">
                      <div>续传</div>
                      <el-switch v-model="form_add.continuation" />
                    </div>
                    <div class="items">
                      <div>测点断线断电</div>
                      <el-switch v-model="form_add.pointCutBroken" />
                    </div>
                    <div class="items">
                      <div>RS485断电器断线断电</div>
                      <el-switch v-model="form_add.rsBreakerState" />
                    </div>
                  </div>
                </el-tab-pane>
              </el-tabs>
            </div>
          </div>
        </template>
        <template #footer>
          <div class="footer_btns">
            <div></div>
            <div>
              <el-button @click="open_add = false">取消</el-button>
              <el-button type="primary" @click="saveAdd">确定</el-button>
            </div>
          </div>
        </template>
      </el-drawer>
      <!-- 分站编辑 -->
      <el-drawer v-model="open_edit" custom-class="edit" @close="form_edit = {}" close-on-click-modal :modal="true">
        <template #header>
          <div class="d_header">
            <div class="title">
              <svg-icon icon-class="biaotitubiao" />
              <div style="margin: 0 0 0 8px">
                分站编号{{ form_edit.stationCode }}
              </div>
            </div>
          </div>
        </template>
        <template #default>
          <div class="edit_box">
            <div class="basic_info">
              <el-form :model="form_edit" label-width="auto" label-position="top" :rules="rules" ref="formE">
                <el-row :gutter="16">
                  <el-col :span="6">
                    <el-form-item label="分站编号" prop="stationCode">
                      <div class="data_item">
                        <el-select style="width: 200px" clearable filterable disabled v-model="form_edit.stationCode"
                          placeholder="请选择">
                          <el-option v-for="item in ationNosList" :key="item" :label="item" :value="item">
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="分站类型" prop="stationTypeId">
                      <div class="data_item">
                        <el-select style="width: 200px" clearable filterable v-model="form_edit.stationTypeId"
                          placeholder="请选择" @change="stationTypeChange">
                          <el-option v-for="item in substationType" :key="item.id" :label="item.stationTypeName"
                            :value="item.id">
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="输入口数量">
                      <div class="data_item">
                        <el-input disabled v-model="form_edit.stationInNum" style="width: 200px" placeholder="请输入" />
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="分站模式">
                      <div class="data_item">
                        <el-input disabled v-model="form_edit.stationModelName" style="width: 200px"
                          placeholder="请输入" />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="12">
                    <el-form-item label="安装地点" prop="stationPlaceName">
                      <div class="data_item">
                        <el-select clearable filterable allow-create style="width: 416px"
                          v-model="form_edit.stationPlaceName" placeholder="请选择" @change="selectPlace">
                          <el-option v-for="item in addressInfoList" :key="item.id" :label="item.placeName"
                            :value="item.placeName">
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="所在区域" prop="stationAreaId">
                      <div class="data_item">
                        <el-cascader v-model="form_edit.stationAreaId" style="width: 416px" :options="searchTreeList"
                          clearable :props="{
                            children: 'childList',
                            value: 'id',
                            label: 'areaName',
                            emitPath: false,
                            checkStrictly: true,
                          }" />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="6">
                    <el-form-item label="IP" prop="ipAddr">
                      <div class="data_item">
                        <el-input v-model="form_edit.ipAddr" style="width: 200px" placeholder="请输入" />
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="端口" prop="ipPort">
                      <div class="data_item">
                        <el-input v-model="form_edit.ipPort" style="width: 200px" placeholder="请输入" />
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="通道号">
                      <div class="data_item">
                        <el-select class="w100" filterable allow-create v-model="form_edit.channelNo" placeholder="请选择"
                          @change="channelNoChange">
                          <el-option v-for="item in channelNoList" :key="item.id" :label="item.name" :value="item.id">
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="设备唯一编号">
                      <div class="data_item">
                        <el-input v-model="form_edit.identifyingNo" style="width: 200px" placeholder="请输入" />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="12">
                    <el-form-item>
                      <div class="data_item">
                        <div>
                          地理位置
                          <span style="color: rgba(64, 158, 255, 1)">GIS获取</span>
                        </div>
                        <div class="fbc">
                          <el-input v-model="form_edit.locationX" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
  '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
  .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
  .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                            <template #prefix>
                              <span>X</span>
                            </template>
                          </el-input>
                          <el-input v-model="form_edit.locationY" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
  '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
  .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
  .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                            <template #prefix>
                              <span>Y</span>
                            </template>
                          </el-input>
                          <el-input v-model="form_edit.locationZ" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
  '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
  .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
  .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                            <template #prefix>
                              <span>Z</span>
                            </template>
                          </el-input>
                        </div>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12"> </el-col>
                </el-row>
              </el-form>
            </div>
            <div class="others">
              <el-tabs v-model="activeName" class="demo-tabs2">
                <el-tab-pane name="1">
                  <template #label>
                    <div class="custom-tabs-label">
                      <span>关联电源</span>
                    </div>
                  </template>
                  <div class="tabs_box one">
                    <div style="text-align: right; margin-bottom: 10px">
                      <el-button type="primary" @click="powermodifyListClick()">新增</el-button>
                    </div>
                    <vxe-table border ref="tableRefpowermodify" :data="state.powermodifyList"
                      :key="state.powermodifyList" :checkbox-config="{
                        checkRowKeys: state.powermodifyselectRowsId,
                      }" height="220" :row-config="{ keyField: 'powerId', isHover: true }"
                      @checkbox-change="selectpowermodifyChangeEvent($event)">
                      <vxe-column type="checkbox" width="60"> </vxe-column>
                      <vxe-column field="powerName" title="电源名称">
                      </vxe-column>
                      <vxe-column field="powerTypeName" title="电源类型">
                      </vxe-column>
                      <vxe-column field="powerNo" title="电源号"> </vxe-column>
                      <vxe-column field="stationCode" title="已关联分站">
                      </vxe-column>
                    </vxe-table>
                    <!-- 新增弹框 -->
                    <!-- <teleport to="body"> -->
                    <vxe-modal esc-closable destroy-on-close :lock-view="false" :width="660" :height="auto"
                      v-model="state.powermodifyListaddModal" resize :mask="true" showFooter>
                      <template #title>
                        <div class="w100 h100 fsc mask_title">新增关联电源</div>
                      </template>
                      <template #default>
                        <div class="form_box">
                          <el-form ref="powermodifyListformRef" :model="state.powermodifyListformData"
                            :rules="state.powermodifyListrules" label-position="top">
                            <el-row :gutter="20">
                              <el-col :span="8">
                                <el-form-item label="电源名称" prop="powerName">
                                  <el-input v-model="
                                      state.powermodifyListformData.powerName
                                    " placeholder="请输入"></el-input>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="电源类型" prop="powerTypeName">
                                  <el-select allow-create clearable filterable v-model="
                                      state.powermodifyListformData
                                        .powerTypeName
                                    " placeholder="请选择">
                                    <el-option v-for="item in state.PowerTypeList" :key="item.id"
                                      :label="item.powerTypeName" :value="item.powerTypeName">
                                    </el-option>
                                  </el-select>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="电源号" prop="powerNo">
                                  <el-select clearable filterable v-model="
                                      state.powermodifyListformData.powerNo
                                    " placeholder="请选择">
                                    <el-option v-for="item in [
                                        {
                                          value: 1,
                                          label: '一号电源',
                                        },
                                        {
                                          value: 2,
                                          label: '二号电源',
                                        },
                                        {
                                          value: 3,
                                          label: '三号电源',
                                        },
                                      ]" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                  </el-select>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="电源路数" prop="powerWay">
                                  <el-select filterable v-model="
                                      state.powermodifyListformData.powerWay
                                    " placeholder="请选择">
                                    <el-option v-for="item in [
                                        {
                                          value: 1,
                                          label: '一路',
                                        },
                                        {
                                          value: 2,
                                          label: '二路',
                                        },
                                        {
                                          value: 3,
                                          label: '三路',
                                        },
                                        {
                                          value: 4,
                                          label: '四路',
                                        },
                                        {
                                          value: 6,
                                          label: '六路',
                                        },
                                        {
                                          value: 9,
                                          label: '九路',
                                        },
                                      ]" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                  </el-select>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="控制端口" prop="controlPort">
                                  <el-select filterable v-model="
                                      state.powermodifyListformData.controlPort
                                    " placeholder="请选择">
                                    <el-option v-for="item in [
                                        {
                                          value: 1,
                                          label: '一号开出口',
                                        },
                                        {
                                          value: 2,
                                          label: '二号开出口',
                                        },
                                        {
                                          value: 3,
                                          label: '三号开出口',
                                        },
                                        {
                                          value: 4,
                                          label: '四号开出口',
                                        },
                                        {
                                          value: 5,
                                          label: '五号开出口',
                                        },
                                        {
                                          value: 6,
                                          label: '六号开出口',
                                        },
                                        {
                                          value: 7,
                                          label: '直接控制',
                                        },
                                      ]" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                  </el-select>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="放电时间门限" prop="timeThreshold">
                                  <el-select clearable filterable v-model="
                                      state.powermodifyListformData
                                        .timeThreshold
                                    " placeholder="请选择">
                                    <el-option v-for="item in state.TimeList" :key="item" :label="item + '小时'"
                                      :value="item">
                                    </el-option>
                                  </el-select>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="容量门限" prop="capacityThreshold">
                                  <el-select clearable filterable v-model="
                                      state.powermodifyListformData
                                        .capacityThreshold
                                    " placeholder="请选择">
                                    <el-option v-for="item in state.CapacityList" :key="item" :label="item"
                                      :value="item">
                                    </el-option>
                                  </el-select>
                                </el-form-item>
                              </el-col>
                            </el-row>
                          </el-form>
                        </div>
                      </template>
                      <template #footer>
                        <el-button @click="powermodifyListcancel">取消</el-button>
                        <el-button type="primary" @click="powermodifyListsubmitForm">
                          确定
                        </el-button>
                      </template>
                    </vxe-modal>
                    <!-- </teleport> -->
                  </div>
                </el-tab-pane>
                <el-tab-pane label="其他配置" name="2">
                  <div class="tabs_box two">
                    <div class="items">
                      <div>无主断电</div>
                      <el-switch v-model="form_edit.isPlaceotherBreakfalg" />
                    </div>
                    <div class="items">
                      <div>瓦斯抽放</div>
                      <el-switch v-model="form_edit.isGasDrainage" />
                    </div>
                    <div class="items">
                      <div>以太网</div>
                      <el-switch v-model="form_edit.isNetwork" />
                    </div>
                    <div class="items">
                      <div>禁止非即插即用传感器</div>
                      <el-switch v-model="form_edit.noOldprotocolSensor" />
                    </div>
                    <div class="items">
                      <div>续传</div>
                      <el-switch v-model="form_edit.continuation" />
                    </div>
                    <div class="items">
                      <div>测点断线断电</div>
                      <el-switch v-model="form_edit.pointCutBroken" />
                    </div>
                    <div class="items">
                      <div>RS485断电器断线断电</div>
                      <el-switch v-model="form_edit.rsBreakerState" />
                    </div>
                  </div>
                </el-tab-pane>
                <el-tab-pane label="操作日志" name="3">
                  <div class="tabs_box three">
                    <!-- <div class="header">
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">操作模块</div>
                        <el-input
                          v-model="input"
                          clearable
                          style="width: 82px"
                          placeholder="请输入"
                        />
                      </div>
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">操作人</div>
                        <el-select
                          v-model="value"
                          clearable
                          placeholder="请选择"
                          style="width: 82px"
                        >
                          <el-option
                            v-for="item in options"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          />
                        </el-select>
                      </div>
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">时刻</div>
                        <el-date-picker
                          clearable
                          style="width: 320px"
                          v-model="value2"
                          type="datetimerange"
                          :shortcuts="shortcuts"
                          range-separator="-"
                          start-placeholder="开始时间"
                          end-placeholder="结束时间"
                        />
                      </div>
                      <div class="btns">
                        <el-button type="primary" style="width: 64px"
                          >查询</el-button
                        >
                        <el-button style="width: 64px">重置</el-button>
                      </div>
                    </div>
                    <el-table
                      :data="tableData"
                      stripe
                      class="table"
                      :header-row-style="{ backgroundColor: '#e3effe' }"
                      :header-cell-style="{
                        backgroundColor: '#e3effe !important',
                      }"
                      max-height="256px"
                    >
                      <el-table-column
                        show-overflow-tooltip
                        prop="address"
                        label="操作时刻"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="work"
                        label="操作类型"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作模块"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作内容"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作结果"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作人"
                      />
                    </el-table> -->
                  </div>
                </el-tab-pane>
              </el-tabs>
            </div>
          </div>
        </template>
        <template #footer>
          <div class="footer_btns">
            <div>
              <el-button type="danger" @click="delStation(form_edit)">删除节点</el-button>
            </div>
            <div>
              <el-button @click="open_edit = false">取消</el-button>
              <el-button type="primary" @click="saveEdit">确定</el-button>
            </div>
          </div>
        </template>
      </el-drawer>
      <!-- 测点新增 -->
      <el-drawer v-model="open_add2" custom-class="edit" @close="closeMoadl" :close-on-click-modal="false"
        :modal="true">
        <template #header>
          <div class="d_header">
            <div class="title">
              <svg-icon icon-class="biaotitubiao" />
              <div style="margin: 0 0 0 8px">
                测点详情(所属分站{{ subStationInfo.stationCode }})
              </div>
            </div>
          </div>
        </template>
        <template #default>
          <div class="edit_box">
            <el-form :model="form_add2" label-width="auto" 
            label-position="top" ref="formRef1" :rules="rules1">
              <div class="basic_info2">
                <!-- <el-form
                :model="form_add2"
                label-width="auto"
                label-position="top"
                ref="formA"
              > -->
                <el-row :gutter="16">
                  <el-col :span="6">
                    <el-form-item label="测点编号" prop="pointCode">
                      <div class="data_item">
                        <el-select style="width: 200px" clearable filterable v-model="form_add2.pointCode"
                          placeholder="请选择" :disabled="editpointId != null">
                          <el-option v-for="item in pointNoList" :key="item" :label="item" :value="item">
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="测点类型" prop="pointType">
                      <div class="data_item">
                        <el-select clearable filterable style="width: 200px" v-model="form_add2.pointType"
                          placeholder="请选择" @change="pointTypeChange" :disabled="editpointId != null">
                          <el-option v-for="item in pointTypeList" :key="item.value" :label="item.name"
                            :value="item.value">
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12" v-if="form_add2.pointType == 1">
                    <el-form-item label="传感器名称" prop="sensorId">
                      <div class="data_item">
                        <el-cascader style="width: 416px" ref="cascaderValue" v-model="form_add2.sensorId"
                          @change="chuangantreeChange" :options="sensorIdList" clearable :props="{ emitPath: false }" />
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12" v-if="form_add2.pointType == 2">
                    <el-form-item label="传感器名称" prop="sensorId">
                      <div class="data_item">
                        <el-select style="width: 200px" clearable filterable v-model="form_add2.sensorId"
                          placeholder="请选择" @change="mulsensorIdChange" :disabled="editpointId != null">
                          <el-option v-for="item in mulsensorIdList" :key="item.id" :label="item.sensorName"
                            :value="item.id">
                          </el-option>
                        </el-select>
                      </div>
                      <el-popover placement="right" :width="600" trigger="hover" v-if="looksensorObj">
                        <template #reference>
                          <el-button type="primary" link style="margin-right: 16px">
                            查看传感器参数
                          </el-button>
                        </template>
                        <template #default>
                          <el-row :gutter="20" class="fac">
                            <el-col :span="4">
                              <img v-if="looksensorObj.imagePath" style="height: 100px; width: 100%"
                                :src="looksensorObj.imagePath" />
                              <img v-else src="@/assets/images/noimg.png" />
                            </el-col>
                            <el-col :span="20">
                              <el-row :gutter="20">
                                <el-col style="font-size: 16px; font-weight: 700" :span="24">
                                  {{ looksensorObj.sensorName }}
                                </el-col>
                                <el-col :span="12" v-for="item in looksensorObj.sensorList">
                                  <span style="
                                      padding: 4px 10px;
                                      display: inline-block;
                                      background-color: rgba(242, 244, 245, 1);
                                      border-radius: 4px;
                                      margin-top: 10px;
                                    ">{{ item.name }}</span>
                                </el-col>
                              </el-row>
                            </el-col>
                          </el-row>
                        </template>
                      </el-popover>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12" v-if="form_add2.pointType == 3">
                    <el-form-item prop="templateId">
                      <label slot="label">
                        <span style="color: #f56c6c">*</span><span>模版名称</span>
                        <el-button link type="primary" style="margin-left: 5px" @click="addtemplateClick">新增模版
                        </el-button>
                      </label>
                      <el-cascader class="w100" ref="templateref" v-model="form_add2.templateId"
                        :options="templateTreeList" clearable :props="{
                          value: 'id',
                          label: 'templateName',
                          emitPath: false,
                        }" @change="templateTreeChange" />
                    </el-form-item>
                  </el-col>
                  <el-col :span="24" v-if="
                      expressionVoList.length > 0 && form_add2.pointType == 3
                    ">
                    <el-form-item prop="expressionVoList">
                      <label slot="label">
                        <span style="color: #f56c6c">*</span><span>虚拟表达式</span>
                      </label>
                      <div class="w100">
                        <span v-for="item in expressionVoList" :key="item">
                          <el-select v-if="item.obj" clearable filterable v-model="item.value"
                            :placeholder="item.value1">
                            <el-option v-for="item1 in item.obj.codeList" :key="item1" :label="item1" :value="item1">
                            </el-option>
                          </el-select>
                          <span v-else>{{ item.value }}</span>
                        </span>
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="12">
                    <el-form-item label="安装地点" prop="pointPlaceName">
                      <div class="data_item">
                        <el-select style="width: 416px" clearable filterable allow-create
                          v-model="form_add2.pointPlaceName" placeholder="请选择">
                          <el-option v-for="item in addressInfoList" :key="item.id" :label="item.placeName"
                            :value="item.placeName">
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="所在区域" prop="pointAreaId">
                      <div class="data_item">
                        <el-cascader style="width: 416px" v-model="form_add2.pointAreaId" :options="searchTreeList"
                          clearable :props="{
                            children: 'childList',
                            value: 'id',
                            label: 'areaName',
                            emitPath: false,
                            checkStrictly: true,
                          }" />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="12" v-if="needPlaceType == true">
                    <el-form-item label="地点类型" prop="placeTypeId">
                      <el-select style="width: 100%" clearable filterable v-model="form_add2.placeTypeId"
                        placeholder="请选择">
                        <el-option v-for="item in placeTypeIdList" :key="item.id"
                          :label="item.typePlace + item.typeCode" :value="item.id">
                        </el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6" v-if="form_add2.pointType != 3">
                    <el-form-item label="瓦斯抽放测点" prop="isGasDrainage">
                      <el-switch v-model="form_add2.isGasDrainage"> </el-switch>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6" v-if="form_add2.isGasDrainage">
                    <el-form-item label="瓦斯抽放监测点组别" prop="gasDrainageGroupno">
                      <el-select class="w100" clearable filterable v-model="form_add2.gasDrainageGroupno"
                        placeholder="请选择">
                        <el-option v-for="item in 4" :key="item" :label="item" :value="item">
                        </el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6" v-if="
                      form_add2.calibration &&
                      form_add2.pointType != 3 &&
                      !editpointId
                    ">
                    <el-form-item label="同步添加到标校管理" prop="isCalibration">
                      <el-switch v-model="form_add2.calibration.isCalibration">
                      </el-switch>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6" v-if="
                      form_add2.pointType != 3 &&
                      form_add2.calibration?.isCalibration
                    ">
                    <el-form-item label="标校间隔时刻(天)" prop="calibration.intervalTime">
                      <el-input oninput="value=value.replace(/[^\d.]/g,'')"
                        v-model.number="form_add2.calibration.intervalTime" placeholder="请输入" :min="1" :max="365">
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12" v-if="form_add2.pointType != 3">
                    <el-form-item label="地理位置">
                      <div class="fbc">
                        <el-input v-model="form_add2.locationX" oninput="value =value.replace(/[^\-\d.]/g, '').replace(/^\./g,  '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1').replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1').replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1').replace(/(\.\d{8})\d*/, '$1')">
                          <template #prefix>
                            <span>X</span>
                          </template>
                        </el-input>
                        <el-input v-model="form_add2.locationY" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                          <template #prefix>
                            <span>Y</span>
                          </template>
                        </el-input>
                        <el-input v-model="form_add2.locationZ" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                          <template #prefix>
                            <span>Z</span>
                          </template>
                        </el-input>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12" v-if="form_add2.pointType != 3">
                    <el-form-item label="设备唯一编号" prop="pointIdentifyingNo">
                      <el-input v-model="form_add2.pointIdentifyingNo" placeholder="请输入">
                      </el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
              </div>
              <!-- 多参测点 -->
              <div class="others activeNameTab" v-if="form_add2.pointType == 2" style="display: flex">
                <el-tabs v-model="mulactiveNamePoint" class="demo-tabs w100" @tab-change="handleClick">
                  <el-tab-pane v-for="(item, index) in form_add2.multiplePointBranchList" :label="
                      item.childIndxName != null
                        ? item.sensorName + '-' + item.childIndexName
                        : item.sensorName
                    " :name="item.sensorId" :key="index">
                    <el-row :gutter="20" v-if="mulactiveNamePoint == item.sensorId">
                      <el-col :span="24">
                        <p class="activeNameTab" style="padding-left: 0px">
                          <span v-for="(point, pointIndex) in pointactiveNameList" :key="point.type"
                            @click="ponitactiveNameTabClick(point.type)">
                            <span v-if="item.baohanD == 'D'">
                              <span v-if="item.needGrandalarm">
                                <span class="span1" :class="
                                    activeNamePoint == point.type
                                      ? 'active1'
                                      : ''
                                  " v-if="item.isCut!=null&&editpointId&&point.type == 3">{{ point.name }}</span>
                                <span class="span1" :class="
                                    activeNamePoint == point.type
                                      ? 'active1'
                                      : ''
                                  " v-if="!editpointId&&point.type == 3">{{ point.name }}</span>
                                <span class="span1" :class="
                                    activeNamePoint == point.type
                                      ? 'active1'
                                      : ''
                                  " v-if="point.type != 4&&point.type != 3">{{ point.name }}</span>
                              </span>
                              <span v-else>
                                <span class="span1" :class="
                                    activeNamePoint == point.type
                                      ? 'active1'
                                      : ''
                                  " v-if="item.isCut!=null&&editpointId&&point.type == 3">{{ point.name }}</span>
                                <span class="span1" :class="
                                    activeNamePoint == point.type
                                      ? 'active1'
                                      : ''
                                  " v-if="!editpointId&&point.type == 3">{{ point.name }}</span>
                                <span class="span1" :class="
                                    activeNamePoint == point.type
                                      ? 'active1'
                                      : ''
                                  " v-if="point.type != 4 && point.type != 2&& point.type != 3">{{ point.name }}</span>
                              </span>
                            </span>
                            <span v-else>
                              <span v-if="item.needGrandalarm">
                                <span class="span1" :class="
                                    activeNamePoint == point.type
                                      ? 'active1'
                                      : ''
                                  " v-if="item.isCut!=null&&editpointId&&point.type == 3">{{ point.name }}</span>
                                <span class="span1" :class="
                                    activeNamePoint == point.type
                                      ? 'active1'
                                      : ''
                                  " v-if="!editpointId&&point.type == 3">{{ point.name }}</span>
                                <span class="span1" v-if="point.type != 3" :class="
                                    activeNamePoint == point.type
                                      ? 'active1'
                                      : ''
                                  ">{{ point.name }}</span>
                              </span>
                              <span v-else>
                                <span class="span1" :class="
                                    activeNamePoint == point.type
                                      ? 'active1'
                                      : ''
                                  " v-if="item.isCut!=null&&editpointId&&point.type == 3">{{ point.name }}</span>
                                <span class="span1" :class="
                                    activeNamePoint == point.type
                                      ? 'active1'
                                      : ''
                                  " v-if="!editpointId&&point.type == 3">{{ point.name }}</span>
                                <span class="span1" :class="
                                    activeNamePoint == point.type
                                      ? 'active1'
                                      : ''
                                  " v-if="point.type != 2&&point.type != 3">{{ point.name }}</span>
                              </span>
                            </span>
                          </span>
                        </p>
                      </el-col>
                      <el-col :span="24" class="desc_box">
                        <div v-if="activeNamePoint == 1">
                          <el-row :gutter="20" v-if="item.obj">
                            <el-col :span="8">
                              <el-form-item label="报警模式"
                                :prop="`multiplePointBranchList[${index}]obj[alarmBasic.alarmType]`"
                                :rules="rules1.field_mulalarmType">
                                <el-select clearable filterable v-model="item.obj.alarmBasic.alarmType"
                                  @change="alarmBasicChange2(item)" placeholder="请选择">
                                  <el-option v-for="item in alarmBasicList" :key="item.code" :label="item.name + '报警'"
                                    :value="item.code">
                                  </el-option>
                                </el-select>
                              </el-form-item>
                            </el-col>
                            <el-col :span="16">
                              <el-form-item label="上限报警值" v-if="
                                  (item.obj.alarmBasic.alarmType == 1 ||
                                    item.obj.alarmBasic.alarmType == 3) &&
                                  item.baohanD != 'D'
                                " :prop="`multiplePointBranchList[${index}]obj[alarmBasic.upAlarmValue]`"
                                :rules="rules1.field_mulupAlarmValue">
                                <div class="fbc">
                                  <el-row :gutter="20">
                                    <el-col :span="12">
                                      <div class="fac">
                                        <span class="wn">报警值≥</span>
                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                            item.obj.alarmBasic.upAlarmValue
                                          " placeholder="报警值≥">
                                        </el-input>
                                      </div>
                                    </el-col>
                                    <el-col :span="12">
                                      <div class="fac">
                                        <span class="wn">解报值＜</span>
                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                            item.obj.alarmBasic.upRelieveValue
                                          " placeholder="解报值＜">
                                        </el-input>
                                      </div>
                                    </el-col>
                                  </el-row>
                                </div>
                              </el-form-item>
                              <el-form-item label="下限报警值" v-if="
                                  (item.obj.alarmBasic.alarmType == 2 ||
                                    item.obj.alarmBasic.alarmType == 3) &&
                                  item.baohanD != 'D'
                                " :prop="`multiplePointBranchList[${index}]obj[alarmBasic.downAlarmValue]`"
                                :rules="rules1.field_muldownAlarmValue">
                                <div class="fbc">
                                  <el-row :gutter="20">
                                    <el-col :span="12">
                                      <div class="fac">
                                        <span class="wn">报警值≤</span>
                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                            item.obj.alarmBasic.downAlarmValue
                                          " placeholder="报警值≤">
                                        </el-input>
                                      </div>
                                    </el-col>
                                    <el-col :span="12">
                                      <div class="fac">
                                        <span class="wn">解报值＞</span>
                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                            item.obj.alarmBasic.downRelieveValue
                                          " placeholder="解报值＞">
                                        </el-input>
                                      </div>
                                    </el-col>
                                  </el-row>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item prop="hasPreAlarm" label-position="left">
                                <span class="wn">预报警</span>
                                <el-switch v-model="item.obj.prealarmBasic.hasPreAlarm">
                                </el-switch>
                                <el-button link type="primary" size="small" @click="hasPreAlarmdescClick">
                                  全部详情
                                </el-button>
                              </el-form-item>
                            </el-col>
                            <el-col :span="16"></el-col>
                            <el-col :span="24" v-if="item.obj.prealarmBasic.hasPreAlarm">
                              <el-row :gutter="20">
                                <el-col :span="6">
                                  <el-form-item label="上限预报值">
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                        item.obj.prealarmBasic.upPrealarmValue
                                      " placeholder="请输入">
                                    </el-input>
                                  </el-form-item>
                                </el-col>
                                <el-col :span="6">
                                  <el-form-item label="下限预报值">
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                        item.obj.prealarmBasic.downPrealarmValue
                                      " placeholder="请输入">
                                    </el-input>
                                  </el-form-item>
                                </el-col>
                                <el-col :span="6">
                                  <el-form-item label="超时"
                                    :prop="`multiplePointBranchList[${index}]obj[prealarmBasic.prealarmTimeout]`"
                                    :rules="rules1.field_mulprealarmTimeout">
                                    <span class="fac">
                                      <el-select clearable filterable v-model="
                                          item.obj.prealarmBasic.prealarmTimeout
                                        " placeholder="请选择">
                                        <el-option v-for="item in prealarmTimeoutData" :key="item" :label="item"
                                          :value="item">
                                        </el-option>
                                      </el-select>
                                      <span class="wn">分钟</span>
                                    </span>
                                  </el-form-item>
                                </el-col>
                              </el-row>
                            </el-col>
                            <el-col :span="24">
                              <el-form-item>
                                <span>恒值预报警</span>
                                <el-switch v-model="
                                    item.obj.prealarmBasic.hasConstantPreAlarm
                                  ">
                                </el-switch>
                                <el-button link type="primary" size="small" @click="hasConstantPreAlarmdescClick">
                                  全部详情
                                </el-button>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8" v-if="item.obj.prealarmBasic.hasConstantPreAlarm">
                              <el-form-item label="恒值持续时间"
                                :prop="`multiplePointBranchList[${index}]obj[prealarmBasic.constantTime]`"
                                :rules="rules1.field_mulconstantTime">
                                <span class="fac">
                                  <el-input oninput="value =value.replace(/[^\-\d]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                      item.obj.prealarmBasic.constantTime
                                    " placeholder="请输入">
                                  </el-input>
                                  <span class="wn">分钟</span>
                                </span>
                              </el-form-item>
                            </el-col>
                          </el-row>
                        </div>
                        <!-- 分级配置 -->
                        <div v-if="activeNamePoint == 2">
                          <el-row :gutter="20" v-if="item.obj">
                            <el-col :span="6">
                              <el-form-item :label="
                                  item.baohanD == 'D'
                                    ? '分级报警'
                                    : '上限分级报警'
                                ">
                                <el-switch v-model="item.obj.hasUpGrandAlarm" @change="hasUpGrandAlarmChange" />
                              </el-form-item>
                            </el-col>
                            <el-col :span="6" v-if="item.baohanD != 'D'">
                              <el-form-item label="下限分级报警">
                                <el-switch v-model="item.obj.hasDownGrandAlarm" @change="hasDownGrandAlarmChange" />
                              </el-form-item>
                            </el-col>
                            <el-col :span="6">
                              <el-form-item label="启用多级报警">
                                <el-switch v-model="item.obj.hasMoreGrandAlarm" />
                              </el-form-item>
                            </el-col>
                            <el-col :span="6" v-if="item.baohanD != 'D'">
                              <el-form-item label="启用涨/跌幅">
                                <el-switch v-model="item.obj.hasChangeGrandAlarm" />
                              </el-form-item>
                            </el-col>
                          </el-row>
                          <el-row v-if="
                              item.obj.hasUpGrandAlarm &&
                              item.obj.hasDownGrandAlarm
                            ">
                            <el-radio-group v-model="radio1">
                              <el-radio-button label="上限分级报警" value="上限分级报警" />
                              <el-radio-button label="下限分级报警" value="下限分级报警" />
                            </el-radio-group>
                          </el-row>
                          <el-row :gutter="20" style="margin: 0 10px" v-if="
                              item.obj.hasMoreGrandAlarm
                                ? radio1 == '上限分级报警' &&
                                  item.obj.hasUpGrandAlarm
                                : item.obj.hasUpGrandAlarm
                            ">
                            <el-row :gutter="20" v-if="item.baohanD != 'D'">
                              <el-col :span="24" v-if="item.obj.hasChangeGrandAlarm">
                                <p class="drawer_sub_title" style="margin-left: 0; padding-top: 10px">
                                  <span> 变化参数设置</span>
                                </p>
                              </el-col>
                              <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                                <el-form-item label="变化率判断门限≥"
                                  :prop="`multiplePointBranchList[${index}]obj[upGrandalarmBasic.grandalarmRate.thresholdValue]`"
                                  :rules="rules1.field_mulupthresholdValue">
                                  <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                      item.obj.upGrandalarmBasic.grandalarmRate
                                        .thresholdValue
                                    " placeholder="请输入">
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                                <el-form-item label="变化率持续周期"
                                  :prop="`multiplePointBranchList[${index}]obj[upGrandalarmBasic.grandalarmRate.rateCycle]`"
                                  :rules="rules1.field_muluprateCycle">
                                  <el-input oninput="value = value
                                          .replace(/[^\d]/g, '')
                                          .replace(/^0+/, '')
                                          .replace(/(\d{8})\d*/, '$1')
                                          .replace(/^$/, '');" v-model="
                                      item.obj.upGrandalarmBasic.grandalarmRate
                                        .rateCycle
                                    " placeholder="请输入">
                                    <template #append>秒</template>
                                  </el-input>
                                </el-form-item>
                              </el-col>
                            </el-row>
                            <!-- todo -->
                            <el-row :gutter="20">
                              <el-col :span="24" v-if="
                                  item.baohanD != 'D' &&
                                  item.obj.hasMoreGrandAlarm
                                ">
                                <el-row :gutter="20">
                                  <el-col :span="24">
                                    <p>六级报警</p>
                                  </el-col>
                                  <el-col :span="8">
                                    <el-form-item label="">
                                      <div class="fac">
                                        <span class="wn">上限预报值≥</span>
                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                            item.obj.upGrandalarmBasic
                                              .grandsixValue
                                          " placeholder="请输入">
                                          <template #append>{{
                                            baohanunit
                                          }}</template>
                                        </el-input>
                                      </div>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="8">
                                    <el-form-item label="">
                                      <div class="fac">
                                        <span class="wn">或 持续时间≤</span>
                                        <el-input oninput="value = value
                                            .replace(/[^\d]/g, '')
                                            .replace(/^0+/, '')
                                            .replace(/(\d{8})\d*/, '$1')
                                            .replace(/^$/, '');" v-model="
                                            item.obj.upGrandalarmBasic
                                              .grandsixTime
                                          " placeholder="请输入">
                                          <template #append>分钟</template>
                                        </el-input>
                                      </div>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="24">
                                    <p>五级报警</p>
                                  </el-col>
                                  <el-col :span="8">
                                    <el-form-item label="">
                                      <div class="fac">
                                        <span class="wn">上限预报值≥</span>
                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                            item.obj.upGrandalarmBasic
                                              .grandfiveValue
                                          " placeholder="请输入">
                                          <template #append>{{
                                            baohanunit
                                          }}</template>
                                        </el-input>
                                      </div>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="8">
                                    <el-form-item label="">
                                      <div class="fac">
                                        <span class="wn">或 持续时间≤</span>
                                        <el-input oninput="value = value
                                            .replace(/[^\d]/g, '')
                                            .replace(/^0+/, '')
                                            .replace(/(\d{8})\d*/, '$1')
                                            .replace(/^$/, '');" v-model="
                                            item.obj.upGrandalarmBasic
                                              .grandfiveTime
                                          " placeholder="请输入">
                                          <template #append>分钟</template>
                                        </el-input>
                                      </div>
                                    </el-form-item>
                                  </el-col>
                                </el-row>
                              </el-col>
                              <el-col :span="24">
                                <p>四级报警</p>
                              </el-col>
                              <el-col :span="8" v-if="item.baohanD != 'D'">
                                <el-form-item label="">
                                  <div class="fac">
                                    <span class="wn">上限预报值≥</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                        item.obj.upGrandalarmBasic
                                          .grandfourValue
                                      " placeholder="请输入">
                                      <template #append>{{
                                        baohanunit
                                      }}</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="">
                                  <div class="fac">
                                    <span class="wn">或 持续时间≤</span>
                                    <el-input oninput="value = value
                                            .replace(/[^\d]/g, '')
                                            .replace(/^0+/, '')
                                            .replace(/(\d{8})\d*/, '$1')
                                            .replace(/^$/, '');" v-model="
                                        item.obj.upGrandalarmBasic.grandfourTime
                                      " placeholder="请输入">
                                      <template #append>分钟</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                                <el-form-item label="" prop="upGrandalarmBasic.grandalarmRate.rateFourValue">
                                  <div class="fac">
                                    <span class="wn">或 涨幅≥</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                        item.obj.upGrandalarmBasic
                                          .grandalarmRate.rateFourValue
                                      " placeholder="请输入">
                                      <template #append>{{
                                        baohanunit
                                      }}</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="24">
                                <p>三级报警</p>
                              </el-col>
                              <el-col :span="8" v-if="item.baohanD != 'D'">
                                <el-form-item label="">
                                  <div class="fac">
                                    <span class="wn">上限预报值≥</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                        item.obj.upGrandalarmBasic
                                          .grandthreeValue
                                      " placeholder="请输入">
                                      <template #append>{{
                                        baohanunit
                                      }}</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="">
                                  <div class="fac">
                                    <span class="wn">或 持续时间≤</span>
                                    <el-input oninput="value = value
                                            .replace(/[^\d]/g, '')
                                            .replace(/^0+/, '')
                                            .replace(/(\d{8})\d*/, '$1')
                                            .replace(/^$/, '');" v-model="
                                        item.obj.upGrandalarmBasic
                                          .grandthreeTime
                                      " placeholder="请输入">
                                      <template #append>分钟</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                                <el-form-item label="" prop="upGrandalarmBasic.grandalarmRate.rateThreeValue">
                                  <div class="fac">
                                    <span class="wn">或 涨幅≥</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                        item.obj.upGrandalarmBasic
                                          .grandalarmRate.rateThreeValue
                                      " placeholder="请输入">
                                      <template #append>{{
                                        baohanunit
                                      }}</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="24">
                                <p>二级报警</p>
                              </el-col>
                              <el-col :span="8" v-if="item.baohanD != 'D'">
                                <el-form-item label="">
                                  <div class="fac">
                                    <span class="wn">上限预报值≥</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                        item.obj.upGrandalarmBasic.grandtwoValue
                                      " placeholder="请输入">
                                      <template #append>{{
                                        baohanunit
                                      }}</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item>
                                  <div class="fac">
                                    <span class="wn">或 持续时间≤</span>
                                    <el-input oninput="value = value
                                            .replace(/[^\d]/g, '')
                                            .replace(/^0+/, '')
                                            .replace(/(\d{8})\d*/, '$1')
                                            .replace(/^$/, '');" v-model="
                                        item.obj.upGrandalarmBasic.grandtwoTime
                                      " placeholder="请输入">
                                      <template #append>分钟</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                                <el-form-item prop="upGrandalarmBasic.grandalarmRate.rateTwoValue">
                                  <div class="fac">
                                    <span class="wn">或 涨幅≥</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                        item.obj.upGrandalarmBasic
                                          .grandalarmRate.rateTwoValue
                                      " placeholder="请输入">
                                      <template #append>{{
                                        baohanunit
                                      }}</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="24">
                                <p>一级报警</p>
                              </el-col>
                              <el-col :span="8" v-if="item.baohanD != 'D'">
                                <el-form-item label="">
                                  <div class="fac">
                                    <span class="wn">上限预报值≥</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                        item.obj.upGrandalarmBasic.grandoneValue
                                      " placeholder="请输入">
                                      <template #append>{{
                                        baohanunit
                                      }}</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item>
                                  <div class="fac">
                                    <span class="wn">或 持续时间≤</span>
                                    <el-input oninput="value = value
                                            .replace(/[^\d]/g, '')
                                            .replace(/^0+/, '')
                                            .replace(/(\d{8})\d*/, '$1')
                                            .replace(/^$/, '');" v-model="
                                        item.obj.upGrandalarmBasic.grandoneTime
                                      " placeholder="请输入">
                                      <template #append>分钟</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                                <el-form-item>
                                  <div class="fac">
                                    <span class="wn">或 涨幅≥</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                        item.obj.upGrandalarmBasic
                                          .grandalarmRate.rateOneValue
                                      " placeholder="请输入">
                                      <template #append>{{
                                        baohanunit
                                      }}</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                            </el-row>
                          </el-row>
                          <el-row :gutter="20" style="margin: 0" v-if="
                              item.obj.hasMoreGrandAlarm
                                ? radio1 == '下限分级报警' &&
                                  item.obj.hasDownGrandAlarm
                                : item.obj.hasDownGrandAlarm
                            ">
                            <el-row :gutter="20">
                              <el-col :span="24" v-if="item.obj.hasChangeGrandAlarm">
                                <p class="drawer_sub_title" style="margin-left: 0; padding-top: 10px">
                                  <span> 变化参数设置</span>
                                </p>
                              </el-col>
                              <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                                <el-form-item label="变化率判断门限≤"
                                  :prop="`multiplePointBranchList[${index}]obj[downGrandalarmBasic.grandalarmRate.thresholdValue]`"
                                  :rules="rules1.field_muldownthresholdValue">
                                  <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                      item.obj.downGrandalarmBasic
                                        .grandalarmRate.thresholdValue
                                    " placeholder="请输入">
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                                <el-form-item label="变化率持续周期"
                                  :prop="`multiplePointBranchList[${index}]obj[downGrandalarmBasic.grandalarmRate.rateCycle]`"
                                  :rules="rules1.field_muldownrateCycle">
                                  <el-input oninput="value = value
                                            .replace(/[^\d]/g, '')
                                            .replace(/^0+/, '')
                                            .replace(/(\d{8})\d*/, '$1')
                                            .replace(/^$/, '');" v-model="
                                      item.obj.downGrandalarmBasic
                                        .grandalarmRate.rateCycle
                                    " placeholder="请输入">
                                    <template #append>秒</template>
                                  </el-input>
                                </el-form-item>
                              </el-col>
                            </el-row>
                            <el-row :gutter="20" v-if="item.obj.hasMoreGrandAlarm" style="margin: 0">
                              <el-col :span="24">
                                <p>六级报警</p>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="" prop="noOldprotocolSensor">
                                  <div class="fac">
                                    <span class="wn">下限预报值≤</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                        item.obj.downGrandalarmBasic
                                          .grandsixValue
                                      " placeholder="请输入">
                                      <template #append>{{
                                        baohanunit
                                      }}</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="">
                                  <div class="fac">
                                    <span class="wn">或 持续时间≤</span>
                                    <el-input oninput="value = value
                                            .replace(/[^\d]/g, '')
                                            .replace(/^0+/, '')
                                            .replace(/(\d{8})\d*/, '$1')
                                            .replace(/^$/, '');" v-model="
                                        item.obj.downGrandalarmBasic
                                          .grandsixTime
                                      " placeholder="请输入">
                                      <template #append>分钟</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                                <el-form-item label="" prop="downGrandalarmBasic.grandalarmRate.rateSixValue">
                                  <div class="fac">
                                    <span class="wn">或 跌幅≥</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                        item.obj.downGrandalarmBasic
                                          .grandalarmRate.rateSixValue
                                      " placeholder="请输入">
                                      <template #append>{{
                                        baohanunit
                                      }}</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="24">
                                <p>五级报警</p>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="" prop="noOldprotocolSensor" v-if="item.obj.hasMoreGrandAlarm">
                                  <div class="fac">
                                    <span class="wn">下限预报值≤</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                        item.obj.downGrandalarmBasic
                                          .grandfiveValue
                                      " placeholder="请输入">
                                      <template #append>{{
                                        baohanunit
                                      }}</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="">
                                  <div class="fac">
                                    <span class="wn">或 持续时间≤</span>
                                    <el-input oninput="value = value
                                            .replace(/[^\d]/g, '')
                                            .replace(/^0+/, '')
                                            .replace(/(\d{8})\d*/, '$1')
                                            .replace(/^$/, '');" v-model="
                                        item.obj.downGrandalarmBasic
                                          .grandfiveTime
                                      " placeholder="请输入">
                                      <template #append>分钟</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                                <el-form-item label="" prop="downGrandalarmBasic.grandalarmRate.rateFiveValue">
                                  <div class="fac">
                                    <span class="wn">或 跌幅≥</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                        item.obj.downGrandalarmBasic
                                          .grandalarmRate.rateFiveValue
                                      " placeholder="请输入">
                                      <template #append>{{
                                        baohanunit
                                      }}</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                            </el-row>
                            <el-col :span="24" :style="{
                                marginLeft: item.obj.hasDownGrandAlarm
                                  ? ''
                                  : '20px',
                              }">
                              <p>四级报警</p>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="" prop="noOldprotocolSensor">
                                <div class="fac">
                                  <span class="wn">下限预报值≤</span>
                                  <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                      item.obj.downGrandalarmBasic
                                        .grandfourValue
                                    " placeholder="请输入">
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="">
                                <div class="fac">
                                  <span class="wn">或 持续时间≤</span>
                                  <el-input oninput="value = value
                                            .replace(/[^\d]/g, '')
                                            .replace(/^0+/, '')
                                            .replace(/(\d{8})\d*/, '$1')
                                            .replace(/^$/, '');" v-model="
                                      item.obj.downGrandalarmBasic.grandfourTime
                                    " placeholder="请输入">
                                    <template #append>分钟</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                              <el-form-item label="" prop="downGrandalarmBasic.grandalarmRate.rateFourValue">
                                <div class="fac">
                                  <span class="wn">或 跌幅≥</span>
                                  <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                      item.obj.downGrandalarmBasic
                                        .grandalarmRate.rateFourValue
                                    " placeholder="请输入">
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="24">
                              <p>三级报警</p>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="">
                                <div class="fac">
                                  <span class="wn">下限预报值≤</span>
                                  <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                      item.obj.downGrandalarmBasic
                                        .grandthreeValue
                                    " placeholder="请输入">
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="">
                                <div class="fac">
                                  <span class="wn">或 持续时间≤</span>
                                  <el-input oninput="value = value
                                            .replace(/[^\d]/g, '')
                                            .replace(/^0+/, '')
                                            .replace(/(\d{8})\d*/, '$1')
                                            .replace(/^$/, '');" v-model="
                                      item.obj.downGrandalarmBasic
                                        .grandthreeTime
                                    " placeholder="请输入">
                                    <template #append>分钟</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                              <el-form-item label="" prop="downGrandalarmBasic.grandalarmRate.rateThreeValue">
                                <div class="fac">
                                  <span class="wn">或 跌幅≥</span>
                                  <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                      item.obj.downGrandalarmBasic
                                        .grandalarmRate.rateThreeValue
                                    " placeholder="请输入">
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="24">
                              <p>二级报警</p>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="">
                                <div class="fac">
                                  <span class="wn">下限预报值≤</span>
                                  <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                      item.obj.downGrandalarmBasic.grandtwoValue
                                    " placeholder="请输入">
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="">
                                <div class="fac">
                                  <span class="wn">或 持续时间≤</span>
                                  <el-input oninput="value = value
                                            .replace(/[^\d]/g, '')
                                            .replace(/^0+/, '')
                                            .replace(/(\d{8})\d*/, '$1')
                                            .replace(/^$/, '');" v-model="
                                      item.obj.downGrandalarmBasic.grandtwoTime
                                    " placeholder="请输入">
                                    <template #append>分钟</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                              <el-form-item label="" prop="downGrandalarmBasic.grandalarmRate.rateTwoValue">
                                <div class="fac">
                                  <span class="wn">或 跌幅≥</span>
                                  <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                      item.obj.downGrandalarmBasic
                                        .grandalarmRate.rateTwoValue
                                    " placeholder="请输入">
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="24">
                              <p>一级报警</p>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="" prop="noOldprotocolSensor">
                                <div class="fac">
                                  <span class="wn">下限预报值≤</span>
                                  <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                      item.obj.downGrandalarmBasic.grandoneValue
                                    " placeholder="请输入">
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="">
                                <div class="fac">
                                  <span class="wn">或 持续时间≤</span>
                                  <el-input oninput="value = value
                                            .replace(/[^\d]/g, '')
                                            .replace(/^0+/, '')
                                            .replace(/(\d{8})\d*/, '$1')
                                            .replace(/^$/, '');" v-model="
                                      item.obj.downGrandalarmBasic.grandoneTime
                                    " placeholder="请输入">
                                    <template #append>分钟</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                              <el-form-item label="" prop="downGrandalarmBasic.grandalarmRate.rateOneValue">
                                <div class="fac">
                                  <span class="wn">或 跌幅≥</span>
                                  <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                      item.obj.downGrandalarmBasic
                                        .grandalarmRate.rateOneValue
                                    " placeholder="请输入">
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                          </el-row>
                        </div>
                        <!-- 普通断电 -->
                        <div v-if="activeNamePoint == 3" class="putongClass">
                          <div style="position: relative" v-if="item.obj">
                            <el-button style="
                                position: absolute;
                                top: 10px;
                                right: 20px;
                                z-index: 2;
                                cursor: pointer;
                              " link type="primary" @click="putongAddClick">
                              <el-icon>
                                <Plus />
                              </el-icon>新增
                            </el-button>
                            <el-tabs v-model="ordintranValue" type="card" class="demo-tabs" :closable="true"
                              @tab-remove="removeTab">
                              <el-tab-pane v-for="(cut, cutindex) in item.obj.cutValueList" :key="cutindex + 1"
                                :label="'断电配置' + (cutindex + 1)" :name="cutindex">
                                <el-row :gutter="20" style="margin-top: 10px">
                                  <el-col :span="6">
                                    <el-form-item label="断电模式"
                                      :prop="`multiplePointBranchList[${index}][obj]cutValueList[${cutindex}][cutType]`"
                                      :rules="rules1.field_mulcutType">
                                      <el-select clearable filterable v-model="cut.cutType" placeholder="请选择">
                                        <el-option v-for="cut in cutTypeList" :key="cut.code" :label="cut.name + '断电'"
                                          :value="cut.code">
                                        </el-option>
                                      </el-select>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="6" v-if="
                                      cut.cutType == 1 && item.baohanD != 'D'
                                    ">
                                    <el-form-item label="断电值≥"
                                      :prop="`multiplePointBranchList[${index}][obj]cutValueList[${cutindex}][cutValue]`"
                                      :rules="rules1.field_mulcutValue">
                                      <el-input v-model="cut.cutValue" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" placeholder="请输入">
                                      </el-input>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="6" v-if="
                                      cut.cutType == 1 && item.baohanD != 'D'
                                    ">
                                    <el-form-item label="复电值＜"
                                      :prop="`multiplePointBranchList[${index}][obj]cutValueList[${cutindex}][resumeValue]`"
                                      :rules="rules1.field_mulresumeValue">
                                      <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="cut.resumeValue"
                                        placeholder="请输入">
                                      </el-input>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="6" v-if="
                                      cut.cutType == 2 && item.baohanD != 'D'
                                    ">
                                    <el-form-item label="断电值≤"
                                      :prop="`multiplePointBranchList[${index}][obj]cutValueList[${cutindex}][cutValue]`"
                                      :rules="rules1.field_mulcutValue1">
                                      <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="cut.cutValue"
                                        placeholder="请输入">
                                      </el-input>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="6" v-if="
                                      cut.cutType == 2 && item.baohanD != 'D'
                                    ">
                                    <el-form-item label="复电值＞"
                                      :prop="`multiplePointBranchList[${index}][obj]cutValueList[${cutindex}][resumeValue]`"
                                      :rules="rules1.field_mulresumeValue1">
                                      <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="cut.resumeValue"
                                        placeholder="请输入">
                                      </el-input>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="6">
                                    <el-button link type="primary" style="margin-top: 35px" @click="addcutdeviceClick">
                                      <el-icon>
                                        <Plus />
                                      </el-icon>断电设备
                                    </el-button>
                                  </el-col>
                                  <el-col :span="24" style="padding: 10px">
                                    <el-collapse v-model="collapseAtive" accordion>
                                      <el-collapse-item :name="index2" v-for="(
                                          item2, index2
                                        ) in cut.cutStationList">
                                        <template #title>
                                          <div class="fbc w100" @click="stopCollapse">
                                            <el-form-item
                                              :prop="`multiplePointBranchList[${index}][obj]cutValueList[${cutindex}]cutStationList[${index2}][stationPlaceName]`"
                                              :rules="
                                                rules1.field_mulstationPlaceName
                                              ">
                                              <span style="margin-top: 20px">
                                                <span>分站</span>
                                                <el-select style="margin: 0 5px" clearable filterable
                                                  v-model="item2.stationCode" placeholder="请选择" @change="
                                                    controlPortChange(
                                                      $event,
                                                      index2
                                                    )
                                                  ">
                                                  <el-option v-for="station in stationPlaceNamList"
                                                    :key="station.stationCode" :label="
                                                      station.stationCode +
                                                      '/' +
                                                      station.stationPlaceName
                                                    " :value="station.stationCode">
                                                  </el-option>
                                                </el-select>
                                                <svg-icon class-name="search-icon" icon-class="delkong" />
                                              </span>
                                            </el-form-item>
                                          </div>
                                        </template>
                                        <div style="margin-top: 10px">
                                          <vxe-table border ref="tableRef2" :data="item2.controlPortList"
                                            :checkbox-config="checkboxConfig" @checkbox-change="
                                              selectChangeEvent($event, index2)
                                            ">
                                            <vxe-column type="checkbox" width="60">
                                            </vxe-column>
                                            <vxe-column field="controlPort" title="开出口号">
                                            </vxe-column>
                                            <vxe-column field="controlPortTypeName" title="控制设备">
                                            </vxe-column>
                                            <vxe-column field="pointPlaceName" title="安装地点">
                                            </vxe-column>
                                            <vxe-column field="feedPointId" title="馈电测点">
                                            </vxe-column>
                                            <vxe-column field="feedSensorName" title="馈电设备">
                                            </vxe-column>
                                            <vxe-column title="配置">
                                              <template #default="{ row }">
                                                <el-button @click="
                                                    pointputongConfigClick(row)
                                                  " link type="primary">
                                                  配置
                                                </el-button>
                                              </template>
                                            </vxe-column>
                                          </vxe-table>
                                        </div>
                                      </el-collapse-item>
                                    </el-collapse>
                                  </el-col>
                                </el-row>
                              </el-tab-pane>
                            </el-tabs>
                          </div>
                        </div>
                        <!-- 配置弹框 -->
                        <!-- <teleport to="body"> -->
                        <vxe-modal esc-closable destroy-on-close :lock-view="false" :width="500" :height="500"
                          v-model="addModalconfig" resize :mask="true">
                          <template #title>
                            <div class="w100 h100 fsc mask_title">
                              配置开出口
                            </div>
                          </template>
                          <template #default>
                            <div class="form_box">
                              <el-form ref="formRefconfig" :model="formDataconfig" :rules="rulesconfig"
                                label-position="top">
                                <el-row :gutter="20">
                                  <el-col :span="12">
                                    <el-form-item label="开出口编号" prop="controlPort">
                                      <el-select disabled clearable filterable v-model="formDataconfig.controlPort"
                                        placeholder="请选择">
                                        <el-option v-for="item in stationmodelList" :key="item.id"
                                          :label="item.stationModelName" :value="item.id">
                                        </el-option>
                                      </el-select>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="12">
                                    <el-form-item label="控制设备" prop="controlPortType">
                                      <el-select class="w100" clearable filterable
                                        v-model="formDataconfig.controlPortType" placeholder="请选择"
                                        @change="controlPortTypeChange">
                                        <el-option v-for="item in controlPortTypeList" :key="item.code"
                                          :label="item.name" :value="item.code">
                                        </el-option>
                                      </el-select>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="24">
                                    <el-form-item label="安装地点" prop="pointPlaceName">
                                      <el-select class="w100" clearable filterable allow-create
                                        v-model="formDataconfig.pointPlaceName" placeholder="请选择">
                                        <el-option v-for="item in addressInfoList" :key="item.id"
                                          :label="item.placeName" :value="item.placeName">
                                        </el-option>
                                      </el-select>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="24" v-if="formDataconfig.controlPortType == 1">
                                    <el-form-item label="馈电测点" prop="feedPointId">
                                      <el-select class="w100" clearable filterable allow-create
                                        v-model="formDataconfig.feedPointId" placeholder="请选择"
                                        @change="feedPointIdChange">
                                        <el-option v-for="item in feedPointIdList" :key="item.pointId" :label="
                                            item.pointId +
                                            '/' +
                                            item.sensorName +
                                            '/' +
                                            item.pointPlaceName
                                          " :value="item.pointId">
                                        </el-option>
                                      </el-select>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="24">
                                    <el-form-item label="地理位置">
                                      <div class="fbc">
                                        <el-input v-model="formDataconfig.locationX" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                                          <template #prefix>
                                            <span>X</span>
                                          </template>
                                        </el-input>
                                        <el-input v-model="formDataconfig.locationY" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                                          <template #prefix>
                                            <span>Y</span>
                                          </template>
                                        </el-input>
                                        <el-input v-model="formDataconfig.locationZ" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                                          <template #prefix>
                                            <span>Z</span>
                                          </template>
                                        </el-input>
                                      </div>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="24">
                                    <el-form-item>
                                      <div class="fec w100">
                                        <el-button type="primary" @click="onSubmitConfigClick">
                                          确定
                                        </el-button>
                                        <el-button @click="cancelConfigClick">
                                          取消
                                        </el-button>
                                      </div>
                                    </el-form-item>
                                  </el-col>
                                </el-row>
                              </el-form>
                            </div>
                          </template>
                        </vxe-modal>
                        <!-- </teleport> -->
                        <div v-if="activeNamePoint == 4">
                          <el-row :gutter="20" v-if="item.obj">
                            <el-col :span="8" v-if="
                                item.obj.cutArea && item.obj.cutArea != null
                              ">
                              <el-form-item label="断电区域"
                                :prop="`multiplePointBranchList[${index}][obj]cutArea[areaIdList]`"
                                :rules="rules1.field_mulcutAreaareaIdList">
                                <el-cascader style="width: 416px" v-model="item.obj.cutArea.areaIdList"
                                  :options="searchTreeList" clearable :props="{
                                    children: 'childList',
                                    value: 'id',
                                    label: 'areaName',
                                    emitPath: false,
                                    multiple: true,
                                  }" />
                              </el-form-item>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="断电值≥"
                                :prop="`multiplePointBranchList[${index}][obj]cutArea[cutValue]`"
                                :rules="rules1.field_mulcutAreacutValue">
                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')"
                                  v-model="item.obj.cutArea.cutValue" placeholder="请输入">
                                </el-input>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="复电值＜"
                                :prop="`multiplePointBranchList[${index}][obj]cutArea[resumeValue]`"
                                :rules="rules1.field_mulcutArearesumeValue">
                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')"
                                  v-model="item.obj.cutArea.resumeValue" placeholder="请输入">
                                </el-input>
                              </el-form-item>
                            </el-col>
                          </el-row>
                        </div>
                      </el-col>
                    </el-row>
                  </el-tab-pane>
                </el-tabs>
              </div>
              <!-- 普通测点 -->
              <div v-if="form_add2.pointType == 1 || form_add2.pointType == 3">
                <el-row :gutter="20">
                  <el-col :span="24" v-if="baohanD != 'S'">
                    <p class="activeNameTab" style="padding-left: 10px">
                      <span v-for="item in pointactiveNameList" :key="item.type"
                        @click="ponitactiveNameTabClick(item.type)">
                        <span v-if="baohanD == 'D'">
                          <span v-if="form_add2.needGrandalarm">
                            <span class="span" :class="
                                activeNamePoint == item.type ? 'active' : ''
                              " v-if="item.type!=3">{{ item.name }}</span>
                       <span v-if="item.type==3&&form_add2.isCut!=null&&editpointId" class="span" :class="
                                activeNamePoint == item.type ? 'active' : ''
                              ">{{ item.name }}</span>
                            <span v-if="item.type==3&&!editpointId" class="span" :class="
                                activeNamePoint == item.type ? 'active' : ''
                              ">{{ item.name }}</span>
                          </span>
                          <span v-else>
                             <span v-if="item.type==3&&form_add2.isCut!=null&&editpointId" class="span" :class="
                                activeNamePoint == item.type ? 'active' : ''
                              ">{{ item.name }}</span>
                            <span v-if="item.type==3&&!editpointId" class="span" :class="
                                activeNamePoint == item.type ? 'active' : ''
                              ">{{ item.name }}</span>
                            <span class="span" :class="
                                activeNamePoint == item.type ? 'active' : ''
                              " v-if="item.type != 2 && item.type != 4 &&item.type!=3">{{ item.name }}</span>
                          </span>
                        </span>
                        <span v-else>
                          <span v-if="form_add2.needGrandalarm && item.type == 2">
                            <span v-if="item.type==3&&form_add2.isCut!=null&&editpointId" class="span" :class="
                                activeNamePoint == item.type ? 'active' : ''
                              ">{{ item.name }}</span>
                            <span v-if="item.type==3&&!editpointId" class="span" :class="
                                activeNamePoint == item.type ? 'active' : ''
                              ">{{ item.name }}</span>
                            <span class="span" :class="
                                activeNamePoint == item.type ? 'active' : ''
                              " v-if="item.type!=3">{{ item.name }}</span>
                          </span>
                          <span v-if="item.type != 2">
                            <span v-if="item.type==3&&form_add2.isCut!=null&&editpointId" class="span" :class="
                                activeNamePoint == item.type ? 'active' : ''
                              ">{{ item.name }}</span>
                            <span v-if="item.type==3&&!editpointId" class="span" :class="
                                activeNamePoint == item.type ? 'active' : ''
                              ">{{ item.name }}</span>
                            <span v-if="item.type!=3" class="span" :class="
                                activeNamePoint == item.type ? 'active' : ''
                              ">{{ item.name }}</span>
                          </span>
                        </span>
                      </span>
                    </p>
                  </el-col>
                  <el-col :span="24" v-if="baohanD != 'S'">
                    <div class="desc_box" v-if="activeNamePoint == 1">
                      <el-row :gutter="20">
                        <el-col :span="6">
                          <el-form-item label="报警模式" prop="alarmBasic.alarmType">
                            <el-select class="w100" clearable filterable v-model="form_add2.alarmBasic.alarmType"
                              @change="alarmBasicChange" placeholder="请选择">
                              <el-option v-for="item in alarmBasicList" :key="item.code" :label="item.name + '报警'"
                                :value="item.code">
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :span="16">
                          <el-form-item label="上限报警值" prop="alarmBasic.alarmType1" v-if="
                              (form_add2.alarmBasic.alarmType == 1 ||
                                form_add2.alarmBasic.alarmType == 3) &&
                              baohanD != 'D'
                            ">
                            <div class="fbc">
                              <el-row :gutter="20">
                                <el-col :span="12">
                                  <div class="fac">
                                    <span class="wn">报警值≥ </span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '').replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1').replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1').replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1').replace(/(\.\d{2})\d*/, '$1')" v-model="
                                        form_add2.alarmBasic.upAlarmValue
                                      " placeholder="报警值≥">
                                    </el-input>
                                  </div>
                                </el-col>
                                <el-col :span="12">
                                  <div class="fac">
                                    <span class="wn">解报值＜ </span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                        form_add2.alarmBasic.upRelieveValue
                                      " placeholder="解报值＜">
                                    </el-input>
                                  </div>
                                </el-col>
                              </el-row>
                            </div>
                          </el-form-item>
                          <el-form-item label="下限报警值" prop="alarmBasic.alarmType2" v-if="
                              (form_add2.alarmBasic.alarmType == 2 ||
                                form_add2.alarmBasic.alarmType == 3) &&
                              baohanD != 'D'
                            ">
                            <div class="fbc">
                              <el-row :gutter="20">
                                <el-col :span="12">
                                  <div class="fac">
                                    <span class="wn">报警值≤</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                        form_add2.alarmBasic.downAlarmValue
                                      " placeholder="报警值≤">
                                    </el-input>
                                  </div>
                                </el-col>
                                <el-col :span="12">
                                  <div class="fac">
                                    <span class="wn">解报值＞</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                        form_add2.alarmBasic.downRelieveValue
                                      " placeholder="解报值＞">
                                    </el-input>
                                  </div>
                                </el-col>
                              </el-row>
                            </div>
                          </el-form-item>
                        </el-col>
                        <el-col :span="8" v-if="form_add2.pointType != 3 && tabPosition2 != 2">
                          <el-form-item label="" prop="hasPreAlarm" label-position="left">
                            <span>预报警</span>
                            <el-switch style="margin: 0 5px" v-model="form_add2.prealarmBasic.hasPreAlarm">
                            </el-switch>
                            <el-button link type="primary" size="small" @click="hasPreAlarmdescClick">
                              全部详情
                            </el-button>
                          </el-form-item>
                        </el-col>
                        <el-col :span="16"></el-col>
                        <el-col :span="6" v-if="
                            baohanD != 'D' &&
                            form_add2.prealarmBasic.hasPreAlarm
                          ">
                          <el-form-item label="上限预报值">
                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')"
                              v-model="form_add2.prealarmBasic.upPrealarmValue" placeholder="请输入">
                            </el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :span="6" v-if="
                            baohanD != 'D' &&
                            form_add2.prealarmBasic.hasPreAlarm
                          ">
                          <el-form-item label="下限预报值">
                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                form_add2.prealarmBasic.downPrealarmValue
                              " placeholder="请输入" :disabled="!form_add2.prealarmBasic.hasPreAlarm">
                            </el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :span="12" v-if="
                            baohanD == 'D' &&
                            form_add2.prealarmBasic.hasPreAlarm
                          ">
                          <el-row :gutter="20">
                            <el-col :span="12" style="margin-top: 16px">
                              <el-radio-group v-model="form_add2.prealarmBasic.prealarmType" class="fbc">
                                <el-radio v-show="item.code != 0" :label="item.code" v-for="item in alarmBasicList"
                                  :key="item">
                                  {{ item.name + "报警" }}</el-radio>
                              </el-radio-group>
                            </el-col>
                          </el-row>
                        </el-col>
                        <el-col :span="6" v-if="form_add2.prealarmBasic.hasPreAlarm">
                          <el-form-item label="超时" prop="prealarmTimeout">
                            <span class="fac">
                              <el-select clearable filterable v-model="
                                  form_add2.prealarmBasic.prealarmTimeout
                                " placeholder="请选择">
                                <el-option v-for="item in prealarmTimeoutData" :key="item" :label="item" :value="item">
                                </el-option>
                              </el-select>
                              <span class="wn">分钟</span>
                            </span>
                          </el-form-item>
                        </el-col>
                        <el-col :span="24" v-if="baohanD != 'D' && form_add2.pointType != 3 && tabPosition2 != 2">
                          <el-form-item label="" prop="hasConstantPreAlarm">
                            <span>恒值预报警</span>
                            <el-switch style="margin: 0 5px" v-model="
                                form_add2.prealarmBasic.hasConstantPreAlarm
                              ">
                            </el-switch>
                            <el-button link type="primary" size="small" @click="hasConstantPreAlarmdescClick">
                              全部详情
                            </el-button>
                          </el-form-item>
                        </el-col>

                        <el-col :span="8" v-if="
                            baohanD != 'D' &&
                            form_add2.prealarmBasic.hasConstantPreAlarm
                          ">
                          <el-form-item label="恒值持续时间" prop="prealarmBasic.constantTime">
                            <span class="fac">
                              <el-input oninput="value =value.replace(/[^\-\d]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                v-model="form_add2.prealarmBasic.constantTime" placeholder="请输入">
                              </el-input>
                              <span class="wn">分钟</span>
                            </span>
                          </el-form-item>
                        </el-col>
                      </el-row>
                    </div>
                    <!-- 预报警全部详情弹框 -->
                    <!-- <teleport> -->
                    <vxe-modal esc-closable destroy-on-close :lock-view="false" :width="1000" :height="500"
                      v-model="addModalhasPreAlarm" resize :mask="true">
                      <template #title>
                        <div class="w100 h100 fsc mask_title">
                          预报警全部详情
                        </div>
                      </template>
                      <template #default>
                        <el-row :gutter="20" style="margin: 10px 0">
                          <el-col :span="8">
                            <span class="wn marr5">设备名称</span>
                            <el-tree-select clearable v-model="hasPreAlarmData.condition"
                              :data="hasPreAlarmData.selList" placeholder="请选择" highlight-current :props="{
                                children: 'children',
                                value: 'code',
                                label: 'name',
                              }" check-strictly @change="chuangantreeChange1" />
                          </el-col>
                          <el-col :span="8">
                            <el-button class="marl20" type="primary" @click="yinyonClick">查询
                            </el-button>
                            <el-button type="info" @click="cancelyinyonClick">重置
                            </el-button>
                          </el-col>
                        </el-row>
                        <vxe-table height="400" :data="hasPreAlarmData.tabledata" border="inner">
                          <vxe-column v-for="(item, index) in hasPreAlarmData.tableheads" :field="item.field"
                            :title="item.title" :params="{ name: item.name }" :width="item.width ? item.width : ''"
                            :key="index">
                          </vxe-column>
                          <vxe-column title="操作">
                            <template #default="{ row }">
                              <el-button link type="primary" @click="yubaojingConfigClick(row)">配置</el-button>
                            </template>
                          </vxe-column>
                        </vxe-table>
                        <vxe-pager v-if="hasPreAlarmData.total > 0" @page-change="hasPreAlarmpagechange"
                          :background="false" class="allbk" align="right" :layouts="[
                            'PrevJump',
                            'PrevPage',
                            'JumpNumber',
                            'NextPage',
                            'NextJump',
                            'Sizes',
                            'FullJump',
                            'Total',
                          ]" v-model:current-page="hasPreAlarmData.query.pageNum"
                          v-model:page-size="hasPreAlarmData.query.pageSize" :total="hasPreAlarmData.total">
                        </vxe-pager>
                      </template>
                    </vxe-modal>
                    <!-- </teleport> -->
                    <!-- 恒值预报警全部详情弹框 -->
                    <!-- <teleport to="body"> -->
                    <vxe-modal esc-closable destroy-on-close :lock-view="false" :width="1000" :height="500"
                      v-model="addModalhasConstantPreAlarm" resize :mask="true">
                      <template #title>
                        <div class="w100 h100 fsc mask_title">
                          恒值预报警全部详情
                        </div>
                      </template>
                      <template #default>
                        <el-row :gutter="20" style="margin: 10px 0">
                          <el-col :span="8">
                            <span class="wn marr5">设备名称</span>
                            <el-tree-select clearable v-model="hasConstantPreAlarmData.condition"
                              :data="hasConstantPreAlarmData.selList" placeholder="请选择" highlight-current :props="{
                                children: 'children',
                                value: 'code',
                                label: 'name',
                              }" check-strictly @change="chuangantreeChange2" />
                          </el-col>
                          <el-col :span="8">
                            <el-button class="marl20" type="primary" @click="yinyonClick1">
                              查询
                            </el-button>
                            <el-button type="info" @click="cancelyinyonClick1">重置
                            </el-button>
                          </el-col>
                        </el-row>
                        <vxe-table height="400" :data="hasConstantPreAlarmData.tabledata" border="inner">
                          <vxe-column v-for="(
                              item, index
                            ) in hasConstantPreAlarmData.tableheads" :field="item.field" :title="item.title"
                            :params="{ name: item.name }" :width="item.width ? item.width : ''" :key="index">
                          </vxe-column>
                          <vxe-column title="操作">
                            <template #default="{ row }">
                              <el-button link type="primary" @click="hengbaojingConfigClick(row)">配置</el-button>
                            </template>
                          </vxe-column>
                        </vxe-table>
                        <vxe-pager v-if="hasConstantPreAlarmData.total > 0" @page-change="hasConstantPreAlarmpagechange"
                          :background="false" class="allbk" align="right" :layouts="[
                            'PrevJump',
                            'PrevPage',
                            'JumpNumber',
                            'NextPage',
                            'NextJump',
                            'Sizes',
                            'FullJump',
                            'Total',
                          ]" v-model:current-page="
                            hasConstantPreAlarmData.query.pageNum
                          " v-model:page-size="
                            hasConstantPreAlarmData.query.pageSize
                          " :total="hasConstantPreAlarmData.total">
                        </vxe-pager>
                      </template>
                    </vxe-modal>
                    <!-- </teleport> -->
                    <!-- 分级配置 -->
                    <div class="desc_box" v-if="activeNamePoint == 2">
                      <el-row :gutter="20">
                        <el-col :span="6">
                          <el-form-item :label="
                              baohanD == 'D' ? '分级报警' : '上限分级报警'
                            " prop="hasUpGrandAlarm">
                            <el-switch v-model="form_add2.hasUpGrandAlarm" @change="hasUpGrandAlarmChange" />
                          </el-form-item>
                        </el-col>
                        <el-col :span="6" v-if="baohanD != 'D'">
                          <el-form-item label="下限分级报警" prop="hasDownGrandAlarm">
                            <el-switch v-model="form_add2.hasDownGrandAlarm" @change="hasDownGrandAlarmChange" />
                          </el-form-item>
                        </el-col>
                        <el-col :span="6">
                          <el-form-item label="启用多级报警" prop="hasMoreGrandAlarm">
                            <el-switch v-model="form_add2.hasMoreGrandAlarm" />
                          </el-form-item>
                        </el-col>
                        <el-col :span="6" v-if="baohanD != 'D'">
                          <el-form-item label="启用涨/跌幅" prop="hasChangeGrandAlarm">
                            <el-switch v-model="form_add2.hasChangeGrandAlarm" />
                          </el-form-item>
                        </el-col>
                      </el-row>
                      <el-row v-if="
                          form_add2.hasUpGrandAlarm &&
                          form_add2.hasDownGrandAlarm
                        ">
                        <el-radio-group v-model="radio1">
                          <el-radio-button label="上限分级报警" value="上限分级报警" />
                          <el-radio-button label="下限分级报警" value="下限分级报警" />
                        </el-radio-group>
                      </el-row>
                      <el-row :gutter="20" style="margin: 0 10px" v-if="
                          radio1 == '上限分级报警' && form_add2.hasUpGrandAlarm
                        ">
                        <el-row :gutter="20" v-if="baohanD != 'D'">
                          <el-col :span="24" v-if="form_add2.hasChangeGrandAlarm">
                            <p class="drawer_sub_title" style="margin-left: 0; padding-top: 10px">
                              <span> 变化参数设置</span>
                            </p>
                          </el-col>
                          <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                            <el-form-item label="变化率判断门限≥" prop="upGrandalarmBasic.grandalarmRate.thresholdValue">
                              <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                  form_add2.upGrandalarmBasic.grandalarmRate
                                    .thresholdValue
                                " placeholder="请输入">
                                <template #append>{{ baohanunit }}</template>
                              </el-input>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                            <el-form-item label="变化率持续周期" prop="upGrandalarmBasic.grandalarmRate.rateCycle">
                              <el-input oninput="value = value
                                                                                .replace(/[^\d]/g, '')
                                                                                .replace(/^0+/, '')
                                                                                .replace(/(\d{8})\d*/, '$1')
                                                                                .replace(/^$/, '');" v-model="
                                  form_add2.upGrandalarmBasic.grandalarmRate
                                    .rateCycle
                                " placeholder="请输入">
                                <template #append>秒</template>
                              </el-input>
                            </el-form-item>
                          </el-col>
                        </el-row>
                        <el-row :gutter="20">
                          <el-col :span="24" v-if="form_add2.hasMoreGrandAlarm">
                            <el-row :gutter="20">
                              <el-col :span="24">
                                <p class="pfz">六级报警</p>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="" prop="upGrandalarmBasic.grandsixValue">
                                  <div class="fac">
                                    <span class="wn">上限预报值≥</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                        form_add2.upGrandalarmBasic
                                          .grandsixValue
                                      " placeholder="请输入">
                                      <template #append>{{
                                        baohanunit
                                      }}</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="" prop="upGrandalarmBasic.grandsixTime">
                                  <div class="fac">
                                    <span class="wn" v-html="
                                        baohanD == 'D'
                                          ? '持续时间≤'
                                          : '或 持续时间≤'
                                      "></span>
                                    <el-input oninput="value = value
                                                                                .replace(/[^\d]/g, '')
                                                                                .replace(/^0+/, '')
                                                                                .replace(/(\d{8})\d*/, '$1')
                                                                                .replace(/^$/, '');" v-model="
                                        form_add2.upGrandalarmBasic.grandsixTime
                                      " placeholder="请输入">
                                      <template #append>分钟</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="24">
                                <p class="pfz">五级报警</p>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="" prop="upGrandalarmBasic.grandfiveValue">
                                  <div class="fac">
                                    <span class="wn">上限预报值≥</span>
                                    <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                        form_add2.upGrandalarmBasic
                                          .grandfiveValue
                                      " placeholder="请输入">
                                      <template #append>{{
                                        baohanunit
                                      }}</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="8">
                                <el-form-item label="" prop="upGrandalarmBasic.grandfiveTime">
                                  <div class="fac">
                                    <span class="wn" v-html="
                                        baohanD == 'D'
                                          ? '持续时间≤'
                                          : '或 持续时间≤'
                                      "></span>
                                    <el-input oninput="value = value
                                                                                .replace(/[^\d]/g, '')
                                                                                .replace(/^0+/, '')
                                                                                .replace(/(\d{8})\d*/, '$1')
                                                                                .replace(/^$/, '');" v-model="
                                        form_add2.upGrandalarmBasic
                                          .grandfiveTime
                                      " placeholder="请输入">
                                      <template #append>分钟</template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                            </el-row>
                          </el-col>
                          <el-col :span="24">
                            <p class="pfz">四级报警</p>
                          </el-col>
                          <el-col :span="8" v-if="baohanD != 'D'">
                            <el-form-item label="" prop="upGrandalarmBasic.grandfourValue">
                              <div class="fac">
                                <span class="wn">上限预报值≥</span>
                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                    form_add2.upGrandalarmBasic.grandfourValue
                                  " placeholder="请输入">
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item label="" prop="upGrandalarmBasic.grandfourTime">
                              <div class="fac">
                                <span class="wn" v-html="
                                    baohanD == 'D'
                                      ? '持续时间≤'
                                      : '或 持续时间≤'
                                  "></span>
                                <el-input oninput="value = value
                                                                                .replace(/[^\d]/g, '')
                                                                                .replace(/^0+/, '')
                                                                                .replace(/(\d{8})\d*/, '$1')
                                                                                .replace(/^$/, '');" v-model="
                                    form_add2.upGrandalarmBasic.grandfourTime
                                  " placeholder="请输入">
                                  <template #append>分钟</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                            <el-form-item label="" prop="upGrandalarmBasic.grandalarmRate.rateFourValue">
                              <div class="fac">
                                <span class="wn">或 涨幅≥</span>
                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                    form_add2.upGrandalarmBasic.grandalarmRate
                                      .rateFourValue
                                  " placeholder="请输入">
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <p class="pfz">三级报警</p>
                          </el-col>
                          <el-col :span="8" v-if="baohanD != 'D'">
                            <el-form-item label="" prop="upGrandalarmBasic.grandthreeValue">
                              <div class="fac">
                                <span class="wn">上限预报值≥</span>
                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                    form_add2.upGrandalarmBasic.grandthreeValue
                                  " placeholder="请输入">
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item label="" prop="upGrandalarmBasic.grandthreeTime">
                              <div class="fac">
                                <span class="wn" v-html="
                                    baohanD == 'D'
                                      ? '持续时间≤'
                                      : '或 持续时间≤'
                                  "></span>
                                <el-input oninput="value = value
                                                                                .replace(/[^\d]/g, '')
                                                                                .replace(/^0+/, '')
                                                                                .replace(/(\d{8})\d*/, '$1')
                                                                                .replace(/^$/, '');" v-model="
                                    form_add2.upGrandalarmBasic.grandthreeTime
                                  " placeholder="请输入">
                                  <template #append>分钟</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                            <el-form-item label="" prop="upGrandalarmBasic.grandalarmRate.rateThreeValue">
                              <div class="fac">
                                <span class="wn">或 涨幅≥</span>
                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                    form_add2.upGrandalarmBasic.grandalarmRate
                                      .rateThreeValue
                                  " placeholder="请输入">
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <p class="pfz">二级报警</p>
                          </el-col>
                          <el-col :span="8" v-if="baohanD != 'D'">
                            <el-form-item label="" prop="upGrandalarmBasic.grandtwoValue">
                              <div class="fac">
                                <span class="wn">上限预报值≥</span>
                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                    form_add2.upGrandalarmBasic.grandtwoValue
                                  " placeholder="请输入">
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item prop="upGrandalarmBasic.grandtwoTime">
                              <div class="fac">
                                <span class="wn" v-html="
                                    baohanD == 'D'
                                      ? '持续时间≤'
                                      : '或 持续时间≤'
                                  "></span>
                                <el-input oninput="value = value
                                                                                .replace(/[^\d]/g, '')
                                                                                .replace(/^0+/, '')
                                                                                .replace(/(\d{8})\d*/, '$1')
                                                                                .replace(/^$/, '');" v-model="
                                    form_add2.upGrandalarmBasic.grandtwoTime
                                  " placeholder="请输入">
                                  <template #append>分钟</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                            <el-form-item prop="upGrandalarmBasic.grandalarmRate.rateTwoValue">
                              <div class="fac">
                                <span class="wn">或 涨幅≥</span>
                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                    form_add2.upGrandalarmBasic.grandalarmRate
                                      .rateTwoValue
                                  " placeholder="请输入">
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <p class="pfz">一级报警</p>
                          </el-col>
                          <el-col :span="8" v-if="baohanD != 'D'">
                            <el-form-item label="" prop="upGrandalarmBasic.grandoneValue">
                              <div class="fac">
                                <span class="wn">上限预报值≥</span>
                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                    form_add2.upGrandalarmBasic.grandoneValue
                                  " placeholder="请输入">
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item prop="upGrandalarmBasic.grandoneTime">
                              <div class="fac">
                                <span class="wn" v-html="
                                    baohanD == 'D'
                                      ? '持续时间≤'
                                      : '或 持续时间≤'
                                  "></span>
                                <el-input oninput="value = value
                                                                                .replace(/[^\d]/g, '')
                                                                                .replace(/^0+/, '')
                                                                                .replace(/(\d{8})\d*/, '$1')
                                                                                .replace(/^$/, '');" v-model="
                                    form_add2.upGrandalarmBasic.grandoneTime
                                  " placeholder="请输入">
                                  <template #append>分钟</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                            <el-form-item prop="upGrandalarmBasic.grandalarmRate.rateOneValue">
                              <div class="fac">
                                <span class="wn">或 涨幅≥</span>
                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                    form_add2.upGrandalarmBasic.grandalarmRate
                                      .rateOneValue
                                  " placeholder="请输入">
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                        </el-row>
                      </el-row>
                      <el-row :gutter="20" style="margin: 0 10px" v-if="
                          radio1 == '下限分级报警' &&
                          form_add2.hasDownGrandAlarm
                        ">
                        <el-row :gutter="20">
                          <el-col :span="24" v-if="form_add2.hasChangeGrandAlarm">
                            <p class="drawer_sub_title" style="margin-left: 0; padding-top: 10px">
                              <span> 变化参数设置</span>
                            </p>
                          </el-col>
                          <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                            <el-form-item label="变化率判断门限≤" prop="downGrandalarmBasic.grandalarmRate.thresholdValue">
                              <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                  form_add2.downGrandalarmBasic.grandalarmRate
                                    .thresholdValue
                                " placeholder="请输入">
                                <template #append>{{ baohanunit }}</template>
                              </el-input>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                            <el-form-item label="变化率持续周期" prop="downGrandalarmBasic.grandalarmRate.rateCycle">
                              <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                  form_add2.downGrandalarmBasic.grandalarmRate
                                    .rateCycle
                                " placeholder="请输入">
                                <template #append>秒</template>
                              </el-input>
                            </el-form-item>
                          </el-col>
                        </el-row>
                        <el-row :gutter="20" style="margin-left: 0" v-if="form_add2.hasMoreGrandAlarm">
                          <el-col :span="24">
                            <p class="pfz">六级报警</p>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item label="" prop="downGrandalarmBasic.grandsixValue">
                              <div class="fac">
                                <span class="wn">下限预报值≤</span>
                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                    form_add2.downGrandalarmBasic.grandsixValue
                                  " placeholder="请输入">
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item label="" prop="downGrandalarmBasic.grandsixTime">
                              <div class="fac">
                                <span class="wn">或 持续时间≤</span>
                                <el-input oninput="value = value
                                                                                .replace(/[^\d]/g, '')
                                                                                .replace(/^0+/, '')
                                                                                .replace(/(\d{8})\d*/, '$1')
                                                                                .replace(/^$/, '');" v-model="
                                    form_add2.downGrandalarmBasic.grandsixTime
                                  " placeholder="请输入">
                                  <template #append>分钟</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                            <el-form-item label="" prop="downGrandalarmBasic.grandalarmRate.rateSixValue">
                              <div class="fac">
                                <span class="wn">或 跌幅≥</span>
                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                    form_add2.downGrandalarmBasic.grandalarmRate
                                      .rateSixValue
                                  " placeholder="请输入">
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <p class="pfz">五级报警</p>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item label="" prop="downGrandalarmBasic.grandfiveValue"
                              v-if="form_add2.hasMoreGrandAlarm">
                              <div class="fac">
                                <span class="wn">下限预报值≤</span>
                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                    form_add2.downGrandalarmBasic.grandfiveValue
                                  " placeholder="请输入">
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item label="" prop="downGrandalarmBasic.grandfiveTime">
                              <div class="fac">
                                <span class="wn">或 持续时间≤</span>
                                <el-input oninput="value = value
                                                                                .replace(/[^\d]/g, '')
                                                                                .replace(/^0+/, '')
                                                                                .replace(/(\d{8})\d*/, '$1')
                                                                                .replace(/^$/, '');" v-model="
                                    form_add2.downGrandalarmBasic.grandfiveTime
                                  " placeholder="请输入">
                                  <template #append>分钟</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                            <el-form-item label="" prop="downGrandalarmBasic.grandalarmRate.rateFiveValue">
                              <div class="fac">
                                <span class="wn">或 跌幅≥</span>
                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                    form_add2.downGrandalarmBasic.grandalarmRate
                                      .rateFiveValue
                                  " placeholder="请输入">
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                        </el-row>
                        <el-col :span="24" style="margin-left: 20px">
                          <p class="pfz">四级报警</p>
                        </el-col>
                        <el-col :span="8">
                          <el-form-item label="" prop="downGrandalarmBasic.grandfourValue">
                            <div class="fac">
                              <span class="wn">下限预报值≤</span>
                              <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                  form_add2.downGrandalarmBasic.grandfourValue
                                " placeholder="请输入">
                                <template #append>{{ baohanunit }}</template>
                              </el-input>
                            </div>
                          </el-form-item>
                        </el-col>
                        <el-col :span="8">
                          <el-form-item label="" prop="downGrandalarmBasic.grandfourTime">
                            <div class="fac">
                              <span class="wn">或 持续时间≤</span>
                              <el-input oninput="value = value
                                                                                .replace(/[^\d]/g, '')
                                                                                .replace(/^0+/, '')
                                                                                .replace(/(\d{8})\d*/, '$1')
                                                                                .replace(/^$/, '');" v-model="
                                  form_add2.downGrandalarmBasic.grandfourTime
                                " placeholder="请输入">
                                <template #append>分钟</template>
                              </el-input>
                            </div>
                          </el-form-item>
                        </el-col>
                        <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                          <el-form-item label="" prop="downGrandalarmBasic.grandalarmRate.rateFourValue">
                            <div class="fac">
                              <span class="wn">或 跌幅≥</span>
                              <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                  form_add2.downGrandalarmBasic.grandalarmRate
                                    .rateFourValue
                                " placeholder="请输入">
                                <template #append>{{ baohanunit }}</template>
                              </el-input>
                            </div>
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <p class="pfz">三级报警</p>
                        </el-col>
                        <el-col :span="8">
                          <el-form-item label="" prop="downGrandalarmBasic.grandthreeValue">
                            <div class="fac">
                              <span class="wn">下限预报值≤</span>
                              <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                  form_add2.downGrandalarmBasic.grandthreeValue
                                " placeholder="请输入">
                                <template #append>{{ baohanunit }}</template>
                              </el-input>
                            </div>
                          </el-form-item>
                        </el-col>
                        <el-col :span="8">
                          <el-form-item label="" prop="downGrandalarmBasic.grandthreeTime">
                            <div class="fac">
                              <span class="wn">或 持续时间≤</span>
                              <el-input oninput="value = value
                                                                                .replace(/[^\d]/g, '')
                                                                                .replace(/^0+/, '')
                                                                                .replace(/(\d{8})\d*/, '$1')
                                                                                .replace(/^$/, '');" v-model="
                                  form_add2.downGrandalarmBasic.grandthreeTime
                                " placeholder="请输入">
                                <template #append>分钟</template>
                              </el-input>
                            </div>
                          </el-form-item>
                        </el-col>
                        <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                          <el-form-item label="" prop="downGrandalarmBasic.grandalarmRate.rateThreeValue">
                            <div class="fac">
                              <span class="wn">或 跌幅≥</span>
                              <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                  form_add2.downGrandalarmBasic.grandalarmRate
                                    .rateThreeValue
                                " placeholder="请输入">
                                <template #append>{{ baohanunit }}</template>
                              </el-input>
                            </div>
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <p class="pfz">二级报警</p>
                        </el-col>
                        <el-col :span="8">
                          <el-form-item label="" prop="downGrandalarmBasic.grandtwoValue">
                            <div class="fac">
                              <span class="wn">下限预报值≤</span>
                              <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                  form_add2.downGrandalarmBasic.grandtwoValue
                                " placeholder="请输入">
                                <template #append>{{ baohanunit }}</template>
                              </el-input>
                            </div>
                          </el-form-item>
                        </el-col>
                        <el-col :span="8">
                          <el-form-item label="" prop="downGrandalarmBasic.grandtwoTime">
                            <div class="fac">
                              <span class="wn">或 持续时间≤</span>
                              <el-input oninput="value = value
                                                                                .replace(/[^\d]/g, '')
                                                                                .replace(/^0+/, '')
                                                                                .replace(/(\d{8})\d*/, '$1')
                                                                                .replace(/^$/, '');" v-model="
                                  form_add2.downGrandalarmBasic.grandtwoTime
                                " placeholder="请输入">
                                <template #append>分钟</template>
                              </el-input>
                            </div>
                          </el-form-item>
                        </el-col>
                        <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                          <el-form-item label="" prop="downGrandalarmBasic.grandalarmRate.rateTwoValue">
                            <div class="fac">
                              <span class="wn">或 跌幅≥</span>
                              <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                  form_add2.downGrandalarmBasic.grandalarmRate
                                    .rateTwoValue
                                " placeholder="请输入">
                                <template #append>{{ baohanunit }}</template>
                              </el-input>
                            </div>
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <p class="pfz">一级报警</p>
                        </el-col>
                        <el-col :span="8">
                          <el-form-item label="" prop="downGrandalarmBasic.grandoneValue">
                            <div class="fac">
                              <span class="wn">下限预报值≤</span>
                              <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" v-model="
                                  form_add2.downGrandalarmBasic.grandoneValue
                                " placeholder="请输入">
                                <template #append>{{ baohanunit }}</template>
                              </el-input>
                            </div>
                          </el-form-item>
                        </el-col>
                        <el-col :span="8">
                          <el-form-item label="" prop="downGrandalarmBasic.grandoneTime">
                            <div class="fac">
                              <span class="wn">或 持续时间></span>
                              <el-input oninput="value = value
                                                                                .replace(/[^\d]/g, '')
                                                                                .replace(/^0+/, '')
                                                                                .replace(/(\d{8})\d*/, '$1')
                                                                                .replace(/^$/, '');" v-model="
                                  form_add2.downGrandalarmBasic.grandoneTime
                                " placeholder="请输入">
                                <template #append>分钟</template>
                              </el-input>
                            </div>
                          </el-form-item>
                        </el-col>
                        <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                          <el-form-item label="" prop="downGrandalarmBasic.grandalarmRate.rateOneValue">
                            <div class="fac">
                              <span class="wn">或 跌幅≥</span>
                              <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" v-model="
                                  form_add2.downGrandalarmBasic.grandalarmRate
                                    .rateOneValue
                                " placeholder="请输入">
                                <template #append>{{ baohanunit }}</template>
                              </el-input>
                            </div>
                          </el-form-item>
                        </el-col>
                      </el-row>
                    </div>
                    <!-- 普通断电 -->
                    <div class="desc_box putongClass" v-if="activeNamePoint == 3">
                      <div style="position: relative">
                        <el-button style="
                            position: absolute;
                            top: 10px;
                            right: 20px;
                            z-index: 2;
                            cursor: pointer;
                          " link type="primary" @click="putongAddClick">
                          <el-icon>
                            <Plus />
                          </el-icon>新增
                        </el-button>
                        <!-- :closable="form_add2.cutValueList.length==1?false:true" -->
                        <el-tabs v-model="ordintranValue" type="card" class="demo-tabs"
                          v-if="form_add2.cutValueList != null" :closable="true" @tab-remove="removeTab">
                          <el-tab-pane v-for="(item, index) in form_add2.cutValueList" :key="index + 1"
                            :label="item.title + (index + 1)" :name="index">
                            <el-row :gutter="20" style="margin-top: 10px">
                              <el-col :span="6">
                                <el-form-item label="断电模式" :prop="`cutValueList[${index}][cutType]`"
                                  :rules="rules1.field_cutType">
                                  <el-select clearable filterable v-model="item.cutType" placeholder="请选择">
                                    <el-option v-for="item in cutTypeList" :key="item.code" :label="item.name + '断电'"
                                      :value="item.code">
                                    </el-option>
                                  </el-select>
                                </el-form-item>
                              </el-col>
                              <el-col :span="6" v-if="item.cutType == 1 && baohanD != 'D'">
                                <el-form-item label="断电值≥" :prop="`cutValueList[${index}][cutValue]`"
                                  :rules="rules1.field_cutValue">
                                  <el-input v-model="item.cutValue" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" placeholder="请输入">
                                  </el-input>
                                </el-form-item>
                              </el-col>
                              <el-col :span="6" v-if="item.cutType == 1 && baohanD != 'D'">
                                <el-form-item label="复电值＜" :prop="`cutValueList[${index}][resumeValue]`"
                                  :rules="rules1.field_resumeValue">
                                  <el-input v-model="item.resumeValue" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" placeholder="请输入">
                                  </el-input>
                                </el-form-item>
                              </el-col>
                              <el-col :span="6" v-if="item.cutType == 2 && baohanD != 'D'">
                                <el-form-item label="断电值≤" :prop="`cutValueList[${index}][cutValue]`"
                                  :rules="rules1.field_cutValue">
                                  <el-input v-model="item.cutValue" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" placeholder="请输入">
                                  </el-input>
                                </el-form-item>
                              </el-col>
                              <el-col :span="6" v-if="item.cutType == 2 && baohanD != 'D'">
                                <el-form-item label="复电值＞" :prop="`cutValueList[${index}][resumeValue]`"
                                  :rules="rules1.field_resumeValue">
                                  <el-input v-model="item.resumeValue" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')" placeholder="请输入">
                                  </el-input>
                                </el-form-item>
                              </el-col>
                              <el-col :span="6">
                                <el-button link type="primary" style="margin-top: 35px" @click="addcutdeviceClick">
                                  <el-icon>
                                    <Plus />
                                  </el-icon>断电设备
                                </el-button>
                              </el-col>
                              <el-col :span="24" style="padding: 10px">
                                <el-collapse v-model="collapseAtive" accordion>
                                  <el-collapse-item :name="index2" v-for="(
                                      item2, index2
                                    ) in item.cutStationList" :key="item2" @click="clickCollapse(item2, index2)">
                                    <template #title>
                                      <div class="fbc w100" @click="stopCollapse">
                                        <span style="padding-top: 22px">
                                          <el-form-item label=""
                                            :prop="`cutValueList[${index}]cutStationList[${index2}][stationPlaceName]`"
                                            :rules="
                                              rules1.field_stationPlaceName
                                            ">
                                            <span>分站</span>
                                            <el-select clearable filterable v-model="item2.stationCode"
                                              placeholder="请选择" @change="
                                                controlPortChange(
                                                  $event,
                                                  index2
                                                )
                                              ">
                                              <el-option v-for="item in stationPlaceNamList" :key="item.stationCode"
                                                :label="
                                                  item.stationCode +
                                                  '/' +
                                                  item.stationPlaceName
                                                " :value="item.stationCode">
                                              </el-option>
                                            </el-select>
                                            <svg-icon class-name="search-icon" icon-class="delkong"
                                              @click.stop="fenzhankong(index2)" />
                                          </el-form-item>
                                        </span>
                                      </div>
                                    </template>
                                    <div style="margin-top: 10px">
                                      <vxe-table border ref="tableRef2" :data="item2.controlPortList" :row-config="{
                                          useKey: true,
                                          keyField: 'pointId',
                                        }" :checkbox-config="checkboxConfig" @checkbox-change="selectChangeEvent">
                                        <vxe-column type="checkbox" width="60">
                                        </vxe-column>
                                        <vxe-column field="controlPort" title="开出口号">
                                        </vxe-column>
                                        <vxe-column field="controlPortTypeName" title="控制设备">
                                        </vxe-column>
                                        <vxe-column field="pointPlaceName" title="安装地点">
                                        </vxe-column>
                                        <vxe-column field="feedPointId" title="馈电测点">
                                        </vxe-column>
                                        <vxe-column field="feedSensorName" title="馈电设备">
                                        </vxe-column>
                                        <vxe-column title="配置">
                                          <template #default="{ row }">
                                            <el-button @click="
                                                pointputongConfigClick(row)
                                              " link type="primary">配置
                                            </el-button>
                                          </template>
                                        </vxe-column>
                                      </vxe-table>
                                    </div>
                                  </el-collapse-item>
                                </el-collapse>
                              </el-col>
                            </el-row>
                          </el-tab-pane>
                        </el-tabs>
                      </div>
                    </div>
                    <!-- 配置弹框 -->
                    <!-- <teleport to="body"> -->
                    <vxe-modal esc-closable destroy-on-close :lock-view="false" :width="500" :height="500"
                      v-model="addModalconfig" resize :mask="true">
                      <template #title>
                        <div class="w100 h100 fsc mask_title">配置开出口</div>
                      </template>
                      <template #default>
                        <div class="form_box">
                          <el-form ref="formRefconfig" :model="formDataconfig" :rules="rulesconfig"
                            label-position="top">
                            <el-row :gutter="20">
                              <el-col :span="12">
                                <el-form-item label="开出口编号" prop="controlPort">
                                  <el-select disabled clearable filterable v-model="formDataconfig.controlPort"
                                    placeholder="请选择">
                                    <el-option v-for="item in stationmodelList" :key="item.id"
                                      :label="item.stationModelName" :value="item.id">
                                    </el-option>
                                  </el-select>
                                </el-form-item>
                              </el-col>
                              <el-col :span="12">
                                <el-form-item label="控制设备" prop="controlPortType">
                                  <el-select class="w100" clearable filterable v-model="formDataconfig.controlPortType"
                                    placeholder="请选择" @change="controlPortTypeChange">
                                    <el-option v-for="item in controlPortTypeList" :key="item.code" :label="item.name"
                                      :value="item.code">
                                    </el-option>
                                  </el-select>
                                </el-form-item>
                              </el-col>
                              <el-col :span="24">
                                <el-form-item label="安装地点" prop="pointPlaceName">
                                  <el-select class="w100" clearable filterable allow-create
                                    v-model="formDataconfig.pointPlaceName" placeholder="请选择">
                                    <el-option v-for="item in addressInfoList" :key="item.id" :label="item.placeName"
                                      :value="item.placeName">
                                    </el-option>
                                  </el-select>
                                </el-form-item>
                              </el-col>
                              <el-col :span="24">
                                <el-form-item label="馈电测点" prop="feedPointId">
                                  <el-select class="w100" clearable filterable allow-create :disabled="
                                      formDataconfig.controlPortType == 2
                                    " v-model="formDataconfig.feedPointId" placeholder="请选择"
                                    @change="feedPointIdChange">
                                    <el-option v-for="item in feedPointIdList" :key="item.pointId" :label="
                                        item.pointId +
                                        '/' +
                                        item.sensorName +
                                        '/' +
                                        item.pointPlaceName
                                      " :value="item.pointId">
                                    </el-option>
                                  </el-select>
                                </el-form-item>
                              </el-col>
                              <el-col :span="24">
                                <el-form-item label="地理位置">
                                  <div class="fbc">
                                    <el-input v-model="formDataconfig.locationX" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                                      <template #prefix>
                                        <span>X</span>
                                      </template>
                                    </el-input>
                                    <el-input v-model="formDataconfig.locationY" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                                      <template #prefix>
                                        <span>Y</span>
                                      </template>
                                    </el-input>
                                    <el-input v-model="formDataconfig.locationZ" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                                      <template #prefix>
                                        <span>Z</span>
                                      </template>
                                    </el-input>
                                  </div>
                                </el-form-item>
                              </el-col>
                              <el-col :span="24">
                                <el-form-item>
                                  <div class="fec w100">
                                    <el-button type="primary" @click="onSubmitConfigClick">确定
                                    </el-button>
                                    <el-button @click="cancelConfigClick">取消
                                    </el-button>
                                  </div>
                                </el-form-item>
                              </el-col>
                            </el-row>
                          </el-form>
                        </div>
                      </template>
                    </vxe-modal>
                    <!-- </teleport> -->
                    <div class="desc_box" v-if="activeNamePoint == 4">
                      <el-row :gutter="20">
                        <el-col :span="8">
                          <el-form-item label="断电区域" prop="cutArea.areaIdList">
                            <el-cascader style="width: 416px" v-model="form_add2.cutArea.areaIdList"
                              :options="searchTreeList" clearable :props="{
                                children: 'childList',
                                value: 'id',
                                label: 'areaName',
                                emitPath: false,
                                multiple: true,
                              }" />
                          </el-form-item>
                        </el-col>
                        <el-col :span="8">
                          <el-form-item :label="baohanD != 'D' ? '断电值' : '断电值≥'" prop="cutArea.cutValue">
                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')"
                              v-model="form_add2.cutArea.cutValue" placeholder="请输入">
                            </el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :span="8">
                          <el-form-item :label="baohanD != 'D' ? '复电值' : '复电值＜'" prop="cutArea.resumeValue">
                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{2})\d*/, '$1')"
                              v-model="form_add2.cutArea.resumeValue" placeholder="请输入">
                            </el-input>
                          </el-form-item>
                        </el-col>
                      </el-row>
                    </div>
                  </el-col>
                </el-row>
              </div>
            </el-form>
          </div>
        </template>
        <template #footer>
          <div class="footer_btns" v-if="userStore.modify">
            <div>
              <el-button type="danger" v-if="editpointId" @click="delPoint(form_add2.pointId)">删除节点</el-button>
            </div>
            <div>
              <el-button @click="open_add2 = false">取消</el-button>
              <el-button type="primary" @click="addpointClick">确定</el-button>
              <!-- <oneclickDelivery></oneclickDelivery> -->
            </div>
          </div>
        </template>
      </el-drawer>
      <!-- 分站使用模板 -->
      <tempConfing v-if="page != 2" :mobanTypeObjoverview="state.mobanTypeObjoverview" :useTempValue="useTempValue">
      </tempConfing>

      <!-- 通道配置 -->
      <div class="info channel" v-if="page == 2">
        <div class="channels">
          <div class="channels_head">
            <div class="title">
              <svg-icon icon-class="biaotitubiao" />
              <div style="margin: 0 0 0 8px">通道(20个)</div>
            </div>
            <div class="two">智能分配</div>
          </div>
          <div class="channels_box">
            <div class="items" :class="{ select: sIndex == index }" v-for="(item, index) in channelList" :key="item"
              @click="getchannelInfo(index, item.id)">
              <div>
                {{ item.name }}
                <svg-icon v-if="item.isContainStation" class-name="search-icon" icon-class="wancheng" />
              </div>
              <div class="xj" v-if="item.channelCycle">
                巡检周期<span>{{ (item.channelCycle / 1000).toFixed(2) }}s</span>
              </div>
            </div>
          </div>
        </div>
        <div class="line" v-if="sIndex != null && channelInfo.length > 0"></div>
        <div class="subchannel" v-if="sIndex != null && channelInfo.length > 0">
          <div class="subchannel_head">
            <div class="title">
              <svg-icon icon-class="biaotitubiao" />
              <div style="margin: 0 0 0 8px; font-size: 16px; font-weight: 700">
                通道{{ channelInfo[0].channelNo }}下属分站<span style="
                    margin: 0 0 0 8px;
                    color: rgba(103, 194, 58, 1);
                    font-size: 14px;
                    font-weight: 400;
                  ">通道巡检周期{{
                    (channelList[sIndex].channelCycle / 1000).toFixed(2)
                  }}秒</span>
              </div>
            </div>
            <div class="two" v-if="userStore.modify" @click="openupDateChannel">
              更换通道
            </div>
          </div>
          <div class="subchannel_box">
            <div class="s_item" :class="{ select: stationBasicDtoList.includes(item) }"
              v-for="(item, index) in channelInfo" :key="item" @click="chooseStation(item, index)">
              <div class="left">
                <div class="title">分站编号</div>
                <div class="stationCode">{{ item.stationCode }}</div>
              </div>
              <div class="right">
                <div>{{ item.stationPlaceName }}</div>
                <div>{{ item.ipAddr }}:{{ item.ipPort }}</div>
              </div>
              <svg-icon v-if="stationBasicDtoList.includes(item)" icon-class="wancheng" />
            </div>
          </div>
        </div>
      </div>
      <!-- 新增表达式模板 -->
      <teleport to="body">
        <vxe-modal esc-closable destroy-on-close :lock-view="false" :width="848" :height="auto" v-model="addtemModal"
          resize :mask="true" :zIndex="2222">
          <template #title>
            <div class="w100 h100 fsc mask_title">新增模板</div>
          </template>
          <template #default>
            <el-row :gutter="20" style="margin-left: 10px; margin-right: 10px">
              <temconfigCom :mobanType="mobanType" @addModal="addtemModalcancel">
                <template v-slot:formtemDatatype>
                  <el-form-item label="模板类型" style="margin-right: 20px">
                    <el-select v-model="mobanType" placeholder="请选择" clearable @change="mobanTypeChange">
                      <el-option v-for="dict in conditionList1" :key="dict.code" :label="dict.name"
                        :value="dict.code" />
                    </el-select>
                  </el-form-item>
                </template>
              </temconfigCom>
            </el-row>
          </template>
        </vxe-modal>
      </teleport>
      <!-- 新增开出口 -->
      <el-drawer v-model="open_port" custom-class="edit" @close="form_add = {}" close-on-click-modal :modal="true">
        <template #header>
          <div class="d_header">
            <div class="title">
              <svg-icon icon-class="biaotitubiao" />
              <div style="margin: 0 0 0 8px">
                开出口详情({{ form_add.stationCode }}C{{
                  form_add.controlPort
                }})
              </div>
            </div>
          </div>
        </template>
        <template #default>
          <div class="port_box">
            <el-form v-if="!controlPortTypeId" :model="form_add" label-width="auto" label-position="top" ref="formRef2">
              <div class="boxone">
                <el-row :gutter="16">
                  <el-col :span="6">
                    <el-form-item label="所属分站">
                      <div class="data_item">
                        <el-input style="width: 200px" v-model="form_add.stationCode" disabled></el-input>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="控制设备">
                      <div class="data_item">
                        <el-select style="width: 200px" clearable filterable v-model="form_add.controlPortType"
                          placeholder="请选择" @change="controlPortTypeChange">
                          <el-option v-for="item in controlPortTypeList" :key="item.code" :label="item.name"
                            :value="item.code">
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="安装地点">
                      <div class="data_item">
                        <el-select clearable filterable allow-create style="width: 416px"
                          v-model="form_add.pointPlaceId" placeholder="请选择" @change="pointPlaceIdopenChange">
                          <el-option v-for="item in addressInfoList" :key="item.id" :label="item.placeName"
                            :value="item.id">
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="12">
                    <el-form-item label="馈电测点">
                      <div class="data_item">
                        <el-select :disabled="form_add.controlPortType == 2" clearable filterable allow-create
                          style="width: 416px" v-model="form_add.feedPointId" placeholder="请选择"
                          @change="feedPointIdChange">
                          <el-option v-for="item in feedPointIdList" :key="item.pointId" :label="
                              item.pointId +
                              '/' +
                              item.sensorName +
                              '/' +
                              item.pointPlaceName
                            " :value="item.pointId">
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item>
                      <div class="data_item">
                        <div>
                          地理位置
                          <span style="color: rgba(64, 158, 255, 1)">GIS获取</span>
                        </div>
                        <div class="fbc">
                          <el-input v-model="form_add.locationX" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                            <template #prefix>
                              <span>X</span>
                            </template>
                          </el-input>
                          <el-input v-model="form_add.locationY" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                            <template #prefix>
                              <span>Y</span>
                            </template>
                          </el-input>
                          <el-input v-model="form_add.locationZ" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                            <template #prefix>
                              <span>Z</span>
                            </template>
                          </el-input>
                        </div>
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
              </div>
            </el-form>
            <el-form class="formBox" v-if="controlPortTypeId" :model="form_add" label-position="top">
              <div class="el-drawer_mash desc_box">
                <el-row :gutter="20">
                  <el-col :span="24">
                    <p class="drawer_sub_title">
                      <span class="sub_title_line">开出口基础信息</span>
                    </p>
                  </el-col>
                  <el-col :span="6">
                    <p>所属分站</p>
                    <p>{{ form_add.stationCode }}</p>
                  </el-col>
                  <el-col :span="6">
                    <p>控制设备</p>
                    <p>{{ form_add.controlPortTypeName }}</p>
                  </el-col>
                  <el-col :span="12">
                    <p>安装地点</p>
                    <p>{{ form_add.pointPlaceName }}</p>
                  </el-col>
                  <el-col :span="12" v-if="form_add.controlPortType != 2">
                    <p>馈电测点</p>
                    <p>
                      {{ form_add.feedPointId }}/{{
                        form_add.feedSensorName
                      }}/{{ form_add.feedPlaceName }}
                    </p>
                  </el-col>
                  <el-col :span="12">
                    <p>设备地理位置</p>
                    <p v-if="
                        form_add.locationX != null ||
                        form_add.locationY != null ||
                        form_add.locationZ != null
                      ">
                      {{ form_add.locationX }}.{{ form_add.locationY }}.{{
                        form_add.locationZ
                      }}
                    </p>
                    <p v-else>-</p>
                  </el-col>
                </el-row>
                <el-row :gutter="20">
                  <el-col :span="24">
                    <p class="drawer_sub_title">
                      <span class="sub_title_line">控制源</span>
                    </p>
                    <vxe-table height="300" :data="controlSourceData.tabledata" border="inner">
                      <vxe-column v-for="(item, index) in controlSourceData.tableheads" :field="item.field"
                        :title="item.title" :params="{ name: item.name }" :width="item.width ? item.width : ''"
                        :key="index">
                      </vxe-column>
                    </vxe-table>
                    <vxe-pager v-if="controlSourceData.total > 0" @page-change="getcontrolSourceList" :background="true"
                      class="allbk" align="right" :layouts="[
                        'PrevJump',
                        'PrevPage',
                        'JumpNumber',
                        'NextPage',
                        'NextJump',
                        'Sizes',
                        'FullJump',
                        'Total',
                      ]" v-model:current-page="controlSourceData.query.pageNum"
                      v-model:page-size="controlSourceData.query.pageSize" :total="controlSourceData.total">
                    </vxe-pager>
                  </el-col>
                </el-row>
              </div>
            </el-form>
          </div>
        </template>
        <template #footer>
          <div class="footer_btns" v-if="userStore.modify">
            <div></div>
            <div>
              <el-button @click="open_port = false">取消</el-button>
              <el-button type="primary" @click="addopenClick">确定</el-button>
            </div>
          </div>
        </template>
      </el-drawer>

      <!-- 更换通道 -->
      <vxe-modal esc-closable destroy-on-close :lock-view="false" :width="448" :height="194" v-model="eidt_channel"
        resize :mask="true">
        <template #title>
          <div class="w100 h100 fsc mask_title">更换通道</div>
        </template>
        <template #default>
          <div class="eidt_channelBox">
            <div class="one">
              <div class="title">通道号</div>
              <el-select style="width: 100%" clearable v-model="form_channel.channelNo" placeholder="请选择">
                <el-option v-for="item in channelList" :key="item.id" :label="item.name" :value="item.id">
                </el-option>
              </el-select>
            </div>
            <div class="footer_btn">
              <el-button @click="cancel">取消</el-button>
              <el-button type="primary" @click="confirmReplace">
                确定
              </el-button>
            </div>
          </div>
        </template>
      </vxe-modal>
    </div>
    <!-- 模板抽屉 -->
    <el-drawer v-model="state.tempDrawerShow" direction="rtl" size="40%" close-on-click-modal :modal="true"
      @close="state.tempDrawerShow==false">
      <template #header="{ close, titleId, titleClass }">
        <h4 class="mask_sub_title">
          <svg-icon icon-class="biaotitubiao" /><span>{{
            state.addModalTitle
          }}</span>
        </h4>
      </template>
      <el-row :gutter="24" v-if="!state.mobanTypeShow">
        <el-col :span="4">
          <div :class="item.value==state.mobanTypeValue?'mobanTypeClass active':'mobanTypeClass'"
            @click="tabmobanTypeClick(item)" v-for="item in state.tempType">
            <span>{{item.label}}</span><em>{{item.num}}</em></div>
        </el-col>
        <el-col :span="20">
          <waterfallCom @openAdd="openAdd" @editClick="editClick" :templateTypeValue="state.mobanTypeValue"
            @reset="reset" :templateTypeShow="true" :useTempValue="state.useTempValue" @confirmAddClick=confirmAddClick>
            <template v-slot:curdBtnUse="item">
              <el-button type="text" @click="useTempClick(item.item)">
                使用
              </el-button>
            </template>
          </waterfallCom>
        </el-col>
      </el-row>
      <div v-else>
        <el-radio-group v-model="state.tabradio" size="small" v-if="state.mobanType != 5">
          <el-radio-button label="detail" value="detail">模板详情</el-radio-button>
          <el-radio-button label="log" value="log">使用日志</el-radio-button>
        </el-radio-group>
        <temconfigCom :mobanType="state.mobanType" :tabradio="state.tabradio" :editId="state.editIdmoban"
          @addModal="canceltemconfigCom" @delTemp="delTemp" :mobanTypeObj="state.mobanTypeObj">
          <template v-slot:curdBtnList>
            <el-button type="info" @click="returnClick">
              返回
            </el-button>
          </template>
        </temconfigCom>
      </div>
    </el-drawer>
  </div>
</template>
<script setup>
  import hisCFDList from "@/views/pages/hisTableList/hisCFDList";
  import axios from "@/utils/request";
  import {
    nextTick,
    onMounted,
    reactive,
    watch
  } from "vue";
  import {
    controlPortsList,
    getinfosearchAll,
    getPointIdsList,
    searchgetTimeList,
    searchgetCapacityList,
    searchgetPowerTypeList,
  } from "@/api/config";
  import temconfigCom from "@/components/commonCom/temconfigCom";
  import tempConfing from "./basicConfig/tempConfing";
  import waterfallCom from "./basicConfig/com/waterfallCom";
  import oneclickDelivery from "@/components/commonCom/oneclickDelivery";
  import {
    table_headers
  } from "@/components/commonCom/table_headers";
  import useUserStore from "@/store/modules/user";
  import {
    ElMessage,
    ElMessageBox
  } from "element-plus";
  import dayjs from 'dayjs'
  const userStore = useUserStore();

  let formA = ref();
  let formE = ref();
  let cascaderValue = ref();
  const {
    proxy
  } = getCurrentInstance();
  // 判断空字符、不存在、为0
  const isEmpty = (value) => value === null || value === undefined || value === "";
  const page = ref(1);
  const activeName = ref("1");
  const activeNamePoint = ref("1");
  const sIndex = ref(null);
  const sIndex2 = ref(null);
  const open_detail = ref(false);
  const open_edit = ref(false);
  const open_add = ref(false);
  const open_add2 = ref(false);
  const open_port = ref(false);
  const showInput = ref(false);
  const showInput2 = ref(false);
  const showInput3 = ref(false);
  const showPointAdd2 = ref(false);
  const showcedian = ref(false);
  const mobanTypeShow = ref(false);
  const showPointAdd = ref();
  const hiddDev = ref(false);
  const addModalhasPreAlarm = ref(false); // 预报警全部详情
  const addModalhasConstantPreAlarm = ref(false); // 恒值预报警全部详情
  const cutValueListyou = ref(false); //测点详情查看处理普通断电
  const addModalconfig = ref(false);
  const eidt_channel = ref(false);
  const showMore = ref();
  const showCaozuo = ref();
  const showDetail = ref(null);
  const showNum = ref(null);
  const showYichang = ref(null);
  const tabPosition = ref("1");
  const tabPosition2 = ref("1");
  const radio1 = ref(""); //上下级分级切换
  const temp_page = ref(1);
  const filerArr = ref([{
      value: null,
      label: "全部"
    },
    {
      value: "0",
      label: "正常"
    },
    {
      value: "2",
      label: "分站故障"
    },
    {
      value: "3",
      label: "初始化"
    },
    {
      value: "4",
      label: "网络故障"
    },
    {
      value: "5",
      label: "重启"
    },
    {
      value: "6",
      label: "路线质量评估"
    },
  ]);
  const filerArr2 = ref([{
      value: null,
      label: "全部"
    },
    {
      value: "0",
      label: "正常"
    },
    {
      value: "1",
      label: "异常"
    },
    {
      value: "2",
      label: "离线"
    },
  ]);
  const conditionList1 = ref([{
      name: "分站模板",
      code: "C",
    },
    {
      name: "电源模板",
      code: "D",
    },
    {
      name: "分析模板",
      code: "A",
    },
    {
      name: "表达式",
      code: "B",
    },
  ]);
  const pointNum = ref([]);
  const powerPoints = ref([]);
  const powerPointsList = ref([]);

  const props = ref({
    label: "areaName",
    value: "id",
    children: "childList",
    emitPath: false,
    checkStrictly: true,
  });
  const form = ref({
    status: null,
    orderByColumn: "error"
  });
  const form2 = ref({});
  const form_add = ref({});
  const form_add2 = ref({
    gasDrainageGroupno: 1,
    hasUpGrandAlarm: false,
    hasDownGrandAlarm: false,
    hasMoreGrandAlarm: false,
    hasChangeGrandAlarm: false,
    calibration: {
      isCalibration: false,
    },
    alarmBasic: {},
    prealarmBasic: {},
    upGrandalarmBasic: {
      grandalarmRate: {},
    },
    downGrandalarmBasic: {
      grandalarmRate: {},
    },
    cutArea: {},
    cutValueList: [
      // {
      //   title: "断电配置",
      //   name: "1",
      //   cutStationList: [
      //     {
      //       controlPortList: [],
      //     },
      //   ],
      // },
    ],
  });
  const form_edit = ref({});
  const formData2 = ref({}); // 表单--开出口
  const form_point = ref({}); // 表单--开出口
  const subStationList = ref([]);
  const subStationInfo = ref({});
  const areaList = ref([]);
  const devList = ref([]);
  const controlPorts = ref([]);
  const addressInfoList = ref([]);
  const searchTreeList = ref([]);
  const channelNoList = ref([]);
  const ationNosList = ref([]);
  const substationType = ref([]);
  const pointNoList = ref([]);
  const stationBasicDtoList = ref([]);
  const pointList = ref([]);
  const sensorIdList = ref([]);
  const mulsensorIdList = ref([]);
  const templateTreeList = ref([]);
  const placeTypeIdList = ref([]);
  const expressionVoList = ref([]); //
  const stationPlaceNamList = ref([]);
  const channelInfo = ref([]);
  const controlPortTypeList = ref([{
      // 控制设备类型
      code: 1,
      name: "断电仪",
    },
    {
      code: 2,
      name: "声光报警",
    },
  ]);
  const prealarmTimeoutData = ref([0, 0.5, 1, 3, 5, 10, 15, 20, 30]); // 超时
  const feedPointIdList = ref([]);
  const infosearchAllList = ref([]);
  const channelList = ref([]);
  const needPlaceType = ref(undefined);
  const scaleDown = ref(undefined);
  const scaleUp = ref(undefined);
  const looksensorObj = ref(undefined); //查看传感器参数
  const mulactiveNamePoint = ref(undefined); // 多参测点tab切换
  const cutconfigId = ref(undefined);
  const cutconfigIdTypestation = ref(undefined); //分站下拉选择
  const cutconfigIdTypereq = ref(undefined); //配置走编辑还是新增接口
  const datatreeCode = ref(undefined); //左侧树形分站code
  const editpointId = ref(undefined);
  const curTreeId = ref(undefined);
  const controlPortTypeId = ref(undefined);
  const baohanunit = ref(""); //传感器名称下拉后单位
  const baohanD = ref(""); //筛选首字母
  const ordintranValue = ref(0); // 普通断电
  const collapseAtive = ref(0);
  const formDataconfig = ref({});
  const form_channel = ref({});
  const realPlugs = ref([]); //即插即用列表
  const stationPoint = ref([]); //分站测点列表
  const stationPowerList = ref([]); //分站关联电源列表
  const pointIndex = ref(null); //分站测点悬浮index
  const powerActive = ref(0);
  const hasPreAlarmData = ref({
    condition: undefined,
    tableheads: computed(() => table_headers.prealarmBasic),
    tabledata: [],
    query: {
      pageNum: 1,
      pageSize: 10,
      condition: undefined,
    },
    total: 0,
    selList: [],
  });
  const hasConstantPreAlarmData = ref({
    condition: undefined,
    tableheads: computed(() => table_headers.constantPrealarm),
    tabledata: [],
    query: {
      pageNum: 1,
      pageSize: 10,
      condition: undefined,
    },
    total: 0,
    selList: [],
  });
  // 控制源
  const controlSourceData = ref({
    tableheads: computed(() => table_headers.controlSource),
    tabledata: [],
    query: {
      pageNum: 1,
      pageSize: 10,
      controlPointIds: undefined,
    },
    total: 0,
  });
  const ponitAddUrl = ref("/point/add");
  const ponitEditUrl = ref("/point/edit");
  const ponitDelUrl = ref("/point/delete");
  const ponitdetailUrl = ref("/point/detail");

  // 分站模板变量
  const addModalTitle = ref("全部模板");
  const tempType = ref([{
      label: "全部模板",
      value: "C,D",
    },
    // {
    //   label: "分析模板",
    //   value: "A",
    // },
    // {
    //   label: "公式",
    //   value: "B",
    // },
    {
      label: "分站模板",
      value: "C",
    },
    {
      label: "电源模板",
      value: "D",
    },
  ]);
  const mobanType = ref(undefined);
  const useTempValue = ref(undefined);
  const tabradio = ref(undefined);
  const mobanTypeObj = ref({});
  const addtemModal = ref(false);

  // 快捷时间选择
  const shortcuts = [{
      text: "昨天",
      value: () => {
        const end = new Date();
        const start = new Date();
        start.setDate(start.getDate() - 1);
        return [start, end];
      },
    },
    {
      text: "上周",
      value: () => {
        const end = new Date();
        const start = new Date();
        start.setDate(start.getDate() - 7);
        return [start, end];
      },
    },
  ];
  const pointTypeList = ref([{
      value: 1,
      name: "普通测点",
    },
    {
      value: 2,
      name: "多参测点",
    },
    {
      value: 3,
      name: "虚拟测点",
    },
  ]);
  const alarmBasicList = ref([{
      code: 0,
      name: "无",
    },
    {
      code: 1,
      name: "上限",
    },
    {
      code: 2,
      name: "下限",
    },
    {
      code: 3,
      name: "上下限",
    },
  ]);
  const cutTypeList = ref([{
      //断电模式
      code: 1,
      name: "上限",
    },
    {
      code: 2,
      name: "下限",
    },
  ]);
  const pointactiveNameList = ref([{
      name: "报警配置",
      type: 1,
    },
    {
      name: "分级配置",
      type: 2,
    },
    {
      name: "普通断电",
      type: 3,
    },
    {
      name: "区域断电",
      type: 4,
    },
  ]);

  // 自定义校验ip
  const validateip = (rule, value, callback) => {
    let reg =
      /^(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[0-9])\.((1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.){2}(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)$/;
    if (!reg.test(value)) return callback(new Error("请输入正确的IP"));
    callback();
  };
  // 自定义校验端口
  const validatePass = (rule, value, callback) => {
    let reg = new RegExp(
      /^([0-9]|[1-9]\d{1,3}|[1-5]\d{4}|6[0-4]\d{4}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/
    );
    if (!reg.test(value)) return callback(new Error("请输入正确端口(0-65535)"));
    callback();
  };
  // 上限报警值
  const validatealarmType1 = (rule, value, callback) => {
    if (
      Number(form_add2.value.alarmBasic.upAlarmValue) <
      Number(form_add2.value.alarmBasic.upRelieveValue)
    )
      return callback(new Error("上限报警值大于等于上限解报值!"));

    if (
      (!form_add2.value.alarmBasic.upAlarmValue &&
        form_add2.value.alarmBasic.upAlarmValue != 0 &&
        form_add2.value.alarmBasic.upAlarmValue != 1) ||
      (!form_add2.value.alarmBasic.upRelieveValue &&
        form_add2.value.alarmBasic.upRelieveValue != 0 &&
        form_add2.value.alarmBasic.upRelieveValue != 1)
    )
      return callback(new Error("请输入上限报警值或上限解报值!"));

    if (
      Number(form_add2.value.alarmBasic.upAlarmValue) > Number(scaleUp.value) ||
      Number(form_add2.value.alarmBasic.upAlarmValue) < Number(scaleDown.value)
    )
      return callback(
        new Error(
          "上限报警值不在量程范围内" + scaleDown.value + "~" + scaleUp.value
        )
      );

    if (
      Number(form_add2.value.alarmBasic.upRelieveValue) > Number(scaleUp.value) ||
      Number(form_add2.value.alarmBasic.upRelieveValue) < Number(scaleDown.value)
    )
      return callback(
        new Error(
          "上限解报值不在量程范围内" + scaleDown.value + "~" + scaleUp.value
        )
      );
    callback();
  };

  // 下限报警值
  const validatealarmType2 = (rule, value, callback) => {
    if (
      Number(form_add2.value.alarmBasic.downAlarmValue) >
      Number(form_add2.value.alarmBasic.downRelieveValue)
    )
      return callback(new Error("上限报警值大于等于上限解报值!"));

    if (
      !form_add2.value.alarmBasic.downAlarmValue ||
      !form_add2.value.alarmBasic.downRelieveValue
    )
      return callback(new Error("请输入上限报警值或上限解报值!"));

    if (
      Number(form_add2.value.alarmBasic.downAlarmValue) > Number(scaleUp.value) ||
      Number(form_add2.value.alarmBasic.downAlarmValue) < Number(scaleDown.value)
    )
      return callback(
        new Error(
          "下限报警值不在量程范围内" + scaleDown.value + "~" + scaleUp.value
        )
      );

    if (
      Number(form_add2.value.alarmBasic.downRelieveValue) >
      Number(scaleUp.value) ||
      Number(form_add2.value.alarmBasic.downRelieveValue) <
      Number(scaleDown.value)
    )
      return callback(
        new Error(
          "下限解报值不在量程范围内" + scaleDown.value + "~" + scaleUp.value
        )
      );
    callback();
  };
  // 断电值≥
  const validatecutValue = (rule, value, callback) => {
    if (
      Number(form_add2.value.cutArea.cutValue) <
      Number(form_add2.value.cutArea.resumeValue)
    )
      return callback(new Error("断电值要大于等于复电值"));

    if (
      Number(form_add2.value.cutArea.cutValue) > Number(scaleUp.value) ||
      Number(form_add2.value.cutArea.cutValue) < Number(scaleDown.value)
    )
      return callback(
        new Error("断电值不在量程范围内" + scaleDown.value + "~" + scaleUp.value)
      );
    callback();
  };
  const validatecutValue1 = (rule, value, callback) => {
    if (form_add2.value.cutValueList.length > 0) {
      form_add2.value.cutValueList.forEach((item, index) => {
        if (ordintranValue.value == index) {
          if (item.cutType == 1) {
            if (Number(item.cutValue) < Number(item.resumeValue))
              return callback(new Error("上限断电值要大于等于上限复电值"));

            if (
              Number(item.cutValue) > Number(scaleUp.value) ||
              Number(item.cutValue) < Number(scaleDown.value)
            )
              return callback(
                new Error(
                  "断电值不在量程范围内" + scaleDown.value + "~" + scaleUp.value
                )
              );
            callback();
          } else {
            if (Number(item.cutValue) > Number(item.resumeValue))
              return callback(new Error("下限断电值要小于下限复电值"));

            if (
              Number(item.cutValue) > Number(scaleUp.value) ||
              Number(item.cutValue) < Number(scaleDown.value)
            )
              return callback(
                new Error(
                  "断电值不在量程范围内" + scaleDown.value + "~" + scaleUp.value
                )
              );
            callback();
          }
        }
      });
    }
  };
  const validatecutValue2 = (rule, value, callback) => {
    if (form_add2.value.cutValueList.length > 0) {
      form_add2.value.cutValueList.forEach((item, index) => {
        if (ordintranValue.vaue == index) {
          if (item.cutType == 1) {
            if (Number(item.cutValue) < Number(item.resumeValue))
              return callback(new Error("上限断电值要大于等于上限复电值"));

            if (
              Number(item.resumeValue) > Number(scaleUp.value) ||
              Number(item.resumeValue) < Number(scaleDown.value)
            )
              return callback(
                new Error(
                  "复电值不在量程范围内" + scaleDown.value + "~" + scaleUp.value
                )
              );
            callback();
          } else {
            if (Number(item.cutValue) > Number(item.resumeValue))
              return callback(new Error("下限断电值要小于下限复电值"));

            if (
              Number(item.resumeValue) > Number(scaleUp.value) ||
              Number(item.resumeValue) < Number(scaleDown.value)
            )
              return callback(
                new Error(
                  "复电值不在量程范围内" + scaleDown.value + "~" + scaleUp.value
                )
              );
            callback();
          }
        }
      });
    }
    callback();
  };
  const validateupPrealarmValue = (rule, value, callback) => {
    if (!form_add2.value.prealarmBasic.upPrealarmValue)
      return callback(new Error("请输入上限预报值"));

    if (
      Number(form_add2.value.prealarmBasic.upPrealarmValue) >
      Number(form_add2.value.alarmBasic.upAlarmValue)
    )
      return callback(new Error("上限预报值要小于上限报警值"));
    if (
      Number(form_add2.value.prealarmBasic.upPrealarmValue) <
      Number(form_add2.value.alarmBasic.downAlarmValue)
    )
      return callback(new Error("上限预报值要大于下限报警值"));

    if (
      Number(form_add2.value.prealarmBasic.upPrealarmValue) >
      Number(scaleUp.value) ||
      Number(form_add2.value.prealarmBasic.upPrealarmValue) <
      Number(scaleDown.value)
    )
      return callback(
        new Error(
          "上限预报值不在量程范围内" + scaleDown.value + "~" + scaleUp.value
        )
      );
    callback();
  };
  const validateupPrealarmValue2 = (rule, value, callback) => {
    if (!form_add2.value.prealarmBasic.downPrealarmValue)
      return callback(new Error("请输入下限预报值"));

    if (
      Number(form_add2.value.prealarmBasic.downPrealarmValue) >
      Number(form_add2.value.prealarmBasic.upPrealarmValue)
    )
      return callback(new Error("下限预报值要小于上限预报值"));
    if (
      Number(form_add2.value.prealarmBasic.downPrealarmValue) >
      Number(form_add2.value.alarmBasic.upAlarmValue)
    )
      return callback(new Error("下限预报值要小于上限报警值"));
    if (
      Number(form_add2.value.prealarmBasic.downPrealarmValue) <
      Number(form_add2.value.alarmBasic.downAlarmValue)
    )
      return callback(new Error("下限预报值要大于下限报警值"));

    if (
      Number(form_add2.value.prealarmBasic.downPrealarmValue) >
      Number(scaleUp.value) ||
      Number(form_add2.value.prealarmBasic.downPrealarmValue) <
      Number(scaleDown.value)
    )
      return callback(
        new Error(
          "下限预报值不在量程范围内" + scaleDown.value + "~" + scaleUp.value
        )
      );
    callback();
  };
  /**
   * 分级报警
   */
  // 上限-持续时间
  // 6一级=二级>三级>四级>五级>六级

  const grandsixTimevalidate = (rule, value, callback) => {
    if (
      (form_add2.value.upGrandalarmBasic.grandfiveTime &&
        value > Number(form_add2.value.upGrandalarmBasic.grandfiveTime)) ||
      value == Number(form_add2.value.upGrandalarmBasic.grandfiveTime)
    )
      return callback(new Error("六级报警持续时间要小于五级报警持续时间"));
    callback();
  };
  const grandfiveTimevalidate = (rule, value, callback) => {
    if (
      (form_add2.value.upGrandalarmBasic.grandsixTime &&
        value < Number(form_add2.value.upGrandalarmBasic.grandsixTime)) ||
      value == Number(form_add2.value.upGrandalarmBasic.grandsixTime)
    )
      return callback(new Error("五级报警持续时间要大于六级报警持续时间"));
    if (
      (form_add2.value.upGrandalarmBasic.grandfourTime &&
        value > Number(form_add2.value.upGrandalarmBasic.grandfourTime)) ||
      value == Number(form_add2.value.upGrandalarmBasic.grandfourTime)
    )
      return callback(new Error("五级报警持续时间要小于四级报警持续时间"));
    callback();
  };
  const grandfourTimevalidate = (rule, value, callback) => {
    if (
      (form_add2.value.upGrandalarmBasic.grandfiveTime &&
        value < Number(form_add2.value.upGrandalarmBasic.grandfiveTime)) ||
      value == Number(form_add2.value.upGrandalarmBasic.grandfiveTime)
    )
      return callback(new Error("五级报警持续时间要小于四级报警持续时间"));
    if (
      (form_add2.value.upGrandalarmBasic.grandthreeTime &&
        value > Number(form_add2.value.upGrandalarmBasic.grandthreeTime)) ||
      value == Number(form_add2.value.upGrandalarmBasic.grandthreeTime)
    )
      return callback(new Error("四级报警持续时间要小于三级报警持续时间"));
    callback();
  };
  const grandthreeTimevalidate = (rule, value, callback) => {
    if (
      (form_add2.value.upGrandalarmBasic.grandfourTime &&
        value < Number(form_add2.value.upGrandalarmBasic.grandfourTime)) ||
      value == Number(form_add2.value.upGrandalarmBasic.grandfourTime)
    )
      return callback(new Error("四级报警持续时间要小于三级报警持续时间"));
    if (
      (form_add2.value.upGrandalarmBasic.grandtwoTime &&
        value > Number(form_add2.value.upGrandalarmBasic.grandtwoTime)) ||
      value == Number(form_add2.value.upGrandalarmBasic.grandtwoTime)
    )
      return callback(new Error("三级报警持续时间要小于二级报警持续时间"));
    callback();
  };
  const grandtwoTimevalidate = (rule, value, callback) => {
    if (
      (form_add2.value.upGrandalarmBasic.grandthreeTime &&
        value < Number(form_add2.value.upGrandalarmBasic.grandthreeTime)) ||
      value == Number(form_add2.value.upGrandalarmBasic.grandthreeTime)
    )
      return callback(new Error("三级报警持续时间要小于二级报警持续时间"));
    if (
      form_add2.value.upGrandalarmBasic.grandoneTime &&
      value != Number(form_add2.value.upGrandalarmBasic.grandoneTime)
    )
      return callback(new Error("二级报警持续时间要等于一级报警持续时间"));
    callback();
  };
  const grandoneTimevalidate = (rule, value, callback) => {
    if (
      form_add2.value.upGrandalarmBasic.grandtwoTime &&
      value != Number(form_add2.value.upGrandalarmBasic.grandtwoTime)
    )
      return callback(new Error("二级报警持续时间要等于一级报警持续时间"));
    callback();
  };
  // 报警值一级>二级>三级>四级
  const grandfourValuevalidate = (rule, value, callback) => {
    if (
      value > Number(form_add2.value.upGrandalarmBasic.grandthreeValue) ||
      value == Number(form_add2.value.upGrandalarmBasic.grandthreeValue)
    )
      return callback(new Error("四级报警值要小于三级报警值"));
    callback();
  };
  const grandthreeValuevalidate = (rule, value, callback) => {
    if (
      value < Number(form_add2.value.upGrandalarmBasic.grandfourValue) ||
      value == Number(form_add2.value.upGrandalarmBasic.grandfourValue)
    )
      return callback(new Error("四级报警值要小于三级报警值"));
    if (
      value > Number(form_add2.value.upGrandalarmBasic.grandtwoValue) ||
      value == Number(form_add2.value.upGrandalarmBasic.grandtwoValue)
    )
      return callback(new Error("三级报警值要小于二级报警值"));
    callback();
  };
  const grandtwoValuevalidate = (rule, value, callback) => {
    if (
      value < Number(form_add2.value.upGrandalarmBasic.grandthreeValue) ||
      value == Number(form_add2.value.upGrandalarmBasic.grandthreeValue)
    )
      return callback(new Error("三级报警值要小于二级报警值"));
    if (
      value > Number(form_add2.value.upGrandalarmBasic.grandoneValue) ||
      value == Number(form_add2.value.upGrandalarmBasic.grandoneValue)
    )
      return callback(new Error("二级报警值要小于一级报警值"));
    callback();
  };
  const grandoneValuevalidate = (rule, value, callback) => {
    if (
      value < Number(form_add2.value.upGrandalarmBasic.grandtwoValue) ||
      value == Number(form_add2.value.upGrandalarmBasic.grandtwoValue)
    )
      return callback(new Error("二级报警值要小于一级报警值"));
    callback();
  };
  // 涨幅≥一级>二级>三级>四级
  const rateFourValuevalidate = (rule, value, callback) => {
    if (
      value >
      Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateThreeValue) ||
      value ==
      Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateThreeValue)
    )
      return callback(new Error("四级涨幅要小于三级涨幅"));
    callback();
  };
  const rateThreeValuevalidate = (rule, value, callback) => {
    if (
      value <
      Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateFourValue) ||
      value ==
      Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateFourValue)
    )
      return callback(new Error("四级涨幅要小于三级涨幅"));
    if (
      value >
      Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateTwoValue) ||
      value ==
      Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateTwoValue)
    )
      return callback(new Error("三级涨幅要小于二级涨幅"));
    callback();
  };
  const rateTwoValuevalidate = (rule, value, callback) => {
    if (
      value <
      Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateThreeValue) ||
      value ==
      Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateThreeValue)
    )
      return callback(new Error("三级涨幅要小于二级涨幅"));
    if (
      value >
      Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateOneValue) ||
      value ==
      Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateOneValue)
    )
      return callback(new Error("二级涨幅要小于一级涨幅"));
    callback();
  };
  const rateOneValuevalidate = (rule, value, callback) => {
    if (
      value <
      Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateTwoValue) ||
      value ==
      Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateTwoValue)
    )
      return callback(new Error("二级涨幅要小于一级涨幅"));
    callback();
  };
  // 下限
  // 报警值一级<二级<三级<四级<五级<六级
  // 6
  const grandsixValuevalidate1 = (rule, value, callback) => {
    if (
      value < Number(form_add2.value.downGrandalarmBasic.grandfiveValue) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandfiveValue)
    )
      return callback(new Error("六级报警值要大于五级报警值"));
    callback();
  };
  // 5
  const grandfiveValuevalidate1 = (rule, value, callback) => {
    if (
      value > Number(form_add2.value.downGrandalarmBasic.grandsixValue) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandsixValue)
    )
      return callback(new Error("五级报警值要小于六级报警值"));
    if (
      value < Number(form_add2.value.downGrandalarmBasic.grandfourValue) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandfourValue)
    )
      return callback(new Error("五级报警值要大于四级报警值"));
    callback();
  };
  // 4
  const grandfourValuevalidate1 = (rule, value, callback) => {
    if (
      value > Number(form_add2.value.downGrandalarmBasic.grandfiveValue) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandfiveValue)
    )
      return callback(new Error("四级报警值要小于五级报警值"));
    if (
      value < Number(form_add2.value.downGrandalarmBasic.grandthreeValue) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandthreeValue)
    )
      return callback(new Error("四级报警值要大于三级报警值"));
    callback();
  };
  // 3
  const grandthreeValuevalidate1 = (rule, value, callback) => {
    if (
      value > Number(form_add2.value.downGrandalarmBasic.grandfourValue) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandfourValue)
    )
      return callback(new Error("三级报警值要小于四级报警值"));
    if (
      value < Number(form_add2.value.downGrandalarmBasic.grandtwoValue) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandtwoValue)
    )
      return callback(new Error("三级报警值要大于二级报警值"));
    callback();
  };
  // 2
  const grandtwoValuevalidate1 = (rule, value, callback) => {
    if (
      value > Number(form_add2.value.downGrandalarmBasic.grandthreeValue) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandthreeValue)
    )
      return callback(new Error("二级报警值要小于三级报警值"));
    if (
      value < Number(form_add2.value.downGrandalarmBasic.grandoneValue) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandoneValue)
    )
      return callback(new Error("二级报警值要大于一级报警值"));
    callback();
  };
  // 1
  const grandoneValuevalidate1 = (rule, value, callback) => {
    if (value > Number(form_add2.value.downGrandalarmBasic.grandtwoValue))
      return callback(new Error("二级报警值要小于一级报警值"));
    callback();
  };
  // 持续时间
  // 6
  const grandsixTimevalidate1 = (rule, value, callback) => {
    if (
      (form_add2.value.downGrandalarmBasic.grandfiveTime &&
        value < Number(form_add2.value.downGrandalarmBasic.grandfiveTime)) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandfiveTime)
    )
      return callback(new Error("六级持续时间要小于五级持续时间"));
    callback();
  };
  // 5
  const grandfiveTimevalidate1 = (rule, value, callback) => {
    if (
      (form_add2.value.downGrandalarmBasic.grandsixTime &&
        value > Number(form_add2.value.downGrandalarmBasic.grandsixTime)) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandsixTime)
    )
      return callback(new Error("五级持续时间要大于六级持续时间"));
    if (
      (form_add2.value.downGrandalarmBasic.grandfourTime &&
        value < Number(form_add2.value.downGrandalarmBasic.grandfourTime)) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandfourTime)
    )
      return callback(new Error("五级持续时间要小于四级持续时间"));
    callback();
  };
  // 4
  const grandfourTimevalidate1 = (rule, value, callback) => {
    if (
      (form_add2.value.downGrandalarmBasic.grandfiveTime &&
        value > Number(form_add2.value.downGrandalarmBasic.grandfiveTime)) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandfiveTime)
    )
      return callback(new Error("四级持续时间要大于五级持续时间"));
    if (
      (form_add2.value.downGrandalarmBasic.grandthreeTime &&
        value < Number(form_add2.value.downGrandalarmBasic.grandthreeTime)) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandthreeTime)
    )
      return callback(new Error("四级持续时间要小于三级持续时间"));
    callback();
  };
  // 3
  const grandthreeTimevalidate1 = (rule, value, callback) => {
    if (
      (form_add2.value.downGrandalarmBasic.grandfourTime &&
        value > Number(form_add2.value.downGrandalarmBasic.grandfourTime)) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandfourTime)
    ) {
      return callback(new Error("三级持续时间要大于四级持续时间"));
    }
    if (
      (form_add2.value.downGrandalarmBasic.grandtwoTime &&
        value < Number(form_add2.value.downGrandalarmBasic.grandtwoTime)) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandtwoTime)
    ) {
      return callback(new Error("三级持续时间要小于二级持续时间"));
    }
    callback();
  };
  // 2
  const grandtwoTimevalidate1 = (rule, value, callback) => {
    if (
      (form_add2.value.downGrandalarmBasic.grandthreeTime &&
        value > Number(form_add2.value.downGrandalarmBasic.grandthreeTime)) ||
      value == Number(form_add2.value.downGrandalarmBasic.grandthreeTime)
    )
      return callback(new Error("二级持续时间要大于三级持续时间"));
    if (
      form_add2.value.downGrandalarmBasic.grandoneTime &&
      value != Number(form_add2.value.downGrandalarmBasic.grandoneTime)
    )
      return callback(new Error("二级持续时间要等于一级持续时间"));
    callback();
  };
  // 1
  const grandoneTimevalidate1 = (rule, value, callback) => {
    if (
      form_add2.value.downGrandalarmBasic.grandtwoTime &&
      value != Number(form_add2.value.downGrandalarmBasic.grandtwoTime)
    )
      return callback(new Error("二级持续时间要等于一级持续时间"));
    callback();
  };
  // 涨幅
  // 6
  const grandsixRatevalidate1 = (rule, value, callback) => {
    if (
      value <
      Number(
        form_add2.value.downGrandalarmBasic.grandalarmRate.rateFiveValue
      ) ||
      value ==
      Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateFiveValue)
    )
      return callback(new Error("五级跌幅要小于六级跌幅"));
    callback();
  };
  // 5
  const grandfiveRatevalidate1 = (rule, value, callback) => {
    if (
      value >
      Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateSixValue) ||
      value ==
      Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateSixValue)
    )
      return callback(new Error("五级跌幅要小于六级跌幅"));
    if (
      value <
      Number(
        form_add2.value.downGrandalarmBasic.grandalarmRate.rateFourValue
      ) ||
      value ==
      Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateFourValue)
    )
      return callback(new Error("五级跌幅要大于四级跌幅"));
    callback();
  };
  // 4
  const grandfourRatevalidate1 = (rule, value, callback) => {
    if (
      value >
      Number(
        form_add2.value.downGrandalarmBasic.grandalarmRate.rateFiveValue
      ) ||
      value ==
      Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateFiveValue)
    )
      return callback(new Error("四级跌幅要小于五级跌幅"));
    if (
      value <
      Number(
        form_add2.value.downGrandalarmBasic.grandalarmRate.rateThreeValue
      ) ||
      value ==
      Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateThreeValue)
    )
      return callback(new Error("四级跌幅要大于三级跌幅"));
    callback();
  };
  // 3
  const grandthreeRatevalidate1 = (rule, value, callback) => {
    if (
      value >
      Number(
        form_add2.value.downGrandalarmBasic.grandalarmRate.rateFourValue
      ) ||
      value ==
      Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateFourValue)
    )
      return callback(new Error("三级跌幅要小于四级跌幅"));
    if (
      value >
      Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateTwoValue) ||
      value ==
      Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateTwoValue)
    )
      return callback(new Error("三级跌幅要大于二级跌幅"));
    callback();
  };
  // 2
  const grandtwoRatevalidate1 = (rule, value, callback) => {
    if (
      value >
      Number(
        form_add2.value.downGrandalarmBasic.grandalarmRate.rateThreeValue
      ) ||
      value ==
      Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateThreeValue)
    )
      return callback(new Error("二级跌幅要小于三级跌幅"));
    if (
      value <
      Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateOneValue) ||
      value ==
      Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateOneValue)
    )
      return callback(new Error("二级跌幅要大于一级跌幅"));
    callback();
  };
  // 1
  const grandoneRatevalidate1 = (rule, value, callback) => {
    if (
      value >
      Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateTwoValue)
    )
      return callback(new Error("二级跌幅要大于一级跌幅"));
    callback();
  };
  // 虚拟测点
  const mulupAlarmValuevalite = (rule, value, callback) => {
    form_add2.value.multiplePointBranchList.forEach((item) => {
      if (item.obj.alarmBasic != null) {
        if (
          !Number(item.obj.alarmBasic.upAlarmValue) ||
          !Number(item.obj.alarmBasic.upRelieveValue)
        )
          return callback(new Error("请输入上限报警值或解报值"));
        if (
          Number(item.obj.alarmBasic.upAlarmValue) <
          Number(item.obj.alarmBasic.upRelieveValue)
        )
          return callback(new Error("上限报警值要大于解报值"));
        callback();
      }
    });
  };
  const muldownAlarmValuevalite = (rule, value, callback) => {
    form_add2.value.multiplePointBranchList.forEach((item) => {
      if (item.obj.alarmBasic != null) {
        if (
          !Number(item.obj.alarmBasic.downAlarmValue) ||
          !Number(item.obj.alarmBasic.downRelieveValue)
        )
          return callback(new Error("请输入下限报警值或解报值"));
        if (
          Number(item.obj.alarmBasic.downAlarmValue) >
          Number(item.obj.alarmBasic.downRelieveValue)
        )
          return callback(new Error("下限报警值要小于解报值"));
        callback();
      }
    });
  };
  const mulmulcutValue = (rule, value, callback) => {
    form_add2.value.multiplePointBranchList.forEach((item) => {
      if (item.obj.cutValueList != null && item.obj.cutValueList.length > 0) {
        item.obj.cutValueList.forEach((item1) => {
          if (Number(item1.cutValue) < Number(item1.resumeValue))
            return callback(new Error("上限断电值要大于复电值"));
          callback();
        });
      }
    });
  };
  const mulresumeValue = (rule, value, callback) => {
    form_add2.value.multiplePointBranchList.forEach((item) => {
      if (item.obj.cutValueList != null && item.obj.cutValueList.length > 0) {
        item.obj.cutValueList.forEach((item1) => {
          if (Number(item1.cutValue) < Number(item1.resumeValue))
            return callback(new Error("上限断电值要小于复电值"));
          callback();
        });
      }
    });
  };
  const mulmulcutValue1 = (rule, value, callback) => {
    form_add2.value.multiplePointBranchList.forEach((item) => {
      if (item.obj.cutValueList != null && item.obj.cutValueList.length > 0) {
        item.obj.cutValueList.forEach((item1) => {
          if (Number(item1.cutValue) > Number(item1.resumeValue))
            return callback(new Error("下限断电值要小于复电值"));
          callback();
        });
      }
    });
  };
  const mulresumeValue1 = (rule, value, callback) => {
    form_add2.value.multiplePointBranchList.forEach((item) => {
      if (item.obj.cutValueList != null && item.obj.cutValueList.length > 0) {
        item.obj.cutValueList.forEach((item1) => {
          if (Number(item1.cutValue) > Number(item1.resumeValue))
            return callback(new Error("下限断电值要小于复电值"));
          callback();
        });
      }
    });
  };
  const mulareacutValue = (rule, value, callback) => {
    form_add2.value.multiplePointBranchList.forEach((item) => {
      if (item.obj.cutArea != null) {
        if (
          Number(item.obj.cutArea.cutValue) < Number(item.obj.cutArea.resumeValue)
        )
          return callback(new Error("断电值要大于复电值"));
        callback();
      }
    });
  };
  const mularearesumeValue = (rule, value, callback) => {
    form_add2.value.multiplePointBranchList.forEach((item) => {
      if (item.obj.cutArea != null) {
        if (
          Number(item.obj.cutArea.cutValue) < Number(item.obj.cutArea.resumeValue)
        )
          return callback(new Error("断电值要大于复电值"));
        callback();
      }
    });
  };

  // 编辑分站表单校验规则
  const rules = reactive({
    stationCode: [{
      required: true,
      message: "请选择分站编号",
      trigger: "change",
    }, ],
    stationTypeId: [{
      required: true,
      message: "请选择分站类型",
      trigger: "change",
    }, ],
    stationPlaceName: [{
      required: true,
      message: "请选择安装地点",
      trigger: "change",
    }, ],
    stationAreaId: [{
      required: true,
      message: "请选择所在区域",
      trigger: "change",
    }, ],
    ipAddr: [{
        required: true,
        message: "请输入IP",
        trigger: "blur",
      },
      {
        validator: validateip,
        trigger: "blur",
      },
    ],
    ipPort: [{
        required: true,
        message: "请输入端口",
        trigger: "blur",
      },
      {
        validator: validatePass,
        trigger: "blur",
      },
    ],
  });
  //
  const rulesconfig = reactive({
    controlPortType: [{
      required: true,
      message: "请选择控制设备",
      trigger: "change",
    }, ],
    pointPlaceName: [{
      required: true,
      message: "请选择安装地点",
      trigger: "change",
    }, ],
    feedPointId: [{
      required: true,
      message: "请选择馈电测点",
      trigger: "change",
    }, ],
  });
  // 测点表单校验规则
  const rules1 = reactive({
    pointCode: [{
      required: true,
      message: "请选择测点编号",
      trigger: "change",
    }, ],
    pointType: [{
      required: true,
      message: "请选择测点类型",
      trigger: "change",
    }, ],
    sensorId: [{
      required: true,
      message: "请选择传感器名称",
      trigger: "change",
    }, ],
    templateId: [{
      required: true,
      message: "请选择模版名称",
      trigger: "change",
    }, ],
    pointPlaceName: [{
      required: true,
      message: "请选择安装地点",
      trigger: "change",
    }, ],
    pointAreaId: [{
      required: true,
      message: "请选择所在区域",
      trigger: "change",
    }, ],
    placeTypeId: [{
      required: true,
      message: "请选择地点类型",
      trigger: "change",
    }, ],
    gasDrainageGroupno: [{
      required: true,
      message: "请选择瓦斯抽放监测点组别",
      trigger: "change",
    }, ],
    "prealarmBasic.constantTime": [{
      required: true,
      message: "请输入恒值持续时间",
      trigger: "blur",
    }, ],
    "calibration.intervalTime": [{
        required: true,
        message: "请输入标校间隔时刻",
        trigger: "blur",
      },
      {
        type: "number",
        min: 1,
        max: 365,
        message: "大小要在1到365",
        trigger: "blur",
      },
    ],
    "prealarmBasic.upPrealarmValue": [{
      required: true,
      validator: validateupPrealarmValue,
      trigger: "blur",
    }, ],
    "prealarmBasic.downPrealarmValue": [{
      required: true,
      validator: validateupPrealarmValue2,
      trigger: "blur",
    }, ],
    "alarmBasic.alarmType": [{
      required: true,
      message: "请选择报警模式",
      trigger: "change",
    }, ],
    "alarmBasic.alarmType1": [{
      required: true,
      validator: validatealarmType1,
      trigger: "blur",
    }, ],
    "alarmBasic.alarmType2": [{
      required: true,
      validator: validatealarmType2,
      trigger: "blur",
    }, ],
    "upGrandalarmBasic.grandalarmRate.thresholdValue": [{
      required: true,
      message: "请输入",
      trigger: "blur",
    }, ],
    "upGrandalarmBasic.grandalarmRate.rateCycle": [{
      required: true,
      message: "请输入",
      trigger: "blur",
    }, ],
    "upGrandalarmBasic.grandalarmRate.rateFourValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        required: true,
        validator: rateFourValuevalidate,
        trigger: "blur",
      },
    ],
    "upGrandalarmBasic.grandalarmRate.rateThreeValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: rateThreeValuevalidate,
        trigger: "blur",
      },
    ],
    "upGrandalarmBasic.grandalarmRate.rateTwoValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: rateTwoValuevalidate,
        trigger: ["blur", "change"],
      },
    ],
    "upGrandalarmBasic.grandalarmRate.rateOneValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: rateOneValuevalidate,
        trigger: "blur",
      },
    ],
    "upGrandalarmBasic.grandsixTime": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: rateOneValuevalidate,
        trigger: "blur",
      },
    ],
    "upGrandalarmBasic.grandfiveTime": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandfiveTimevalidate,
        trigger: ["blur", "change"],
      },
    ],
    "upGrandalarmBasic.grandfourValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        required: true,
        validator: grandfourValuevalidate,
        trigger: "blur",
      },
    ],
    "upGrandalarmBasic.grandfourTime": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandfourTimevalidate,
        trigger: ["blur", "change"],
      },
    ],
    "upGrandalarmBasic.grandthreeValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandthreeValuevalidate,
        trigger: "blur",
      },
    ],
    "upGrandalarmBasic.grandthreeTime": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandthreeTimevalidate,
        trigger: ["blur", "change"],
      },
    ],
    "upGrandalarmBasic.grandtwoValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandtwoValuevalidate,
        trigger: "blur",
      },
    ],
    "upGrandalarmBasic.grandtwoTime": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandtwoTimevalidate,
        trigger: ["blur", "change"],
      },
    ],
    "upGrandalarmBasic.grandoneValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandoneValuevalidate,
        trigger: "blur",
      },
    ],
    "upGrandalarmBasic.grandoneTime": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandoneTimevalidate,
        trigger: ["blur", "change"],
      },
    ],
    "downGrandalarmBasic.grandsixValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandsixValuevalidate1,
        trigger: "blur",
      },
    ],
    "downGrandalarmBasic.grandsixTime": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandsixTimevalidate1,
        trigger: ["blur", "change"],
      },
    ],
    "downGrandalarmBasic.grandfiveValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandfiveValuevalidate1,
        trigger: "blur",
      },
    ],
    "downGrandalarmBasic.grandfiveTime": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandfiveTimevalidate1,
        trigger: ["blur", "change"],
      },
    ],
    "downGrandalarmBasic.grandfourValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandfourValuevalidate1,
        trigger: "blur",
      },
    ],
    "downGrandalarmBasic.grandfourTime": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandfourTimevalidate1,
        trigger: ["blur", "change"],
      },
    ],
    "downGrandalarmBasic.grandthreeValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandthreeValuevalidate1,
        trigger: "blur",
      },
    ],
    "downGrandalarmBasic.grandthreeTime": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandthreeTimevalidate1,
        trigger: ["blur", "change"],
      },
    ],
    "downGrandalarmBasic.grandtwoValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandtwoValuevalidate1,
        trigger: "blur",
      },
    ],
    "downGrandalarmBasic.grandtwoTime": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandtwoTimevalidate1,
        trigger: ["blur", "change"],
      },
    ],
    "downGrandalarmBasic.grandoneValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandoneValuevalidate1,
        trigger: "blur",
      },
    ],
    "downGrandalarmBasic.grandoneTime": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandoneTimevalidate1,
        trigger: ["blur", "change"],
      },
    ],
    "downGrandalarmBasic.grandalarmRate.thresholdValue": [{
      required: true,
      message: "请输入",
      trigger: "blur",
    }, ],
    "downGrandalarmBasic.grandalarmRate.rateCycle": [{
      required: true,
      message: "请输入",
      trigger: "blur",
    }, ],
    "downGrandalarmBasic.grandalarmRate.rateSixValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandsixRatevalidate1,
        trigger: "blur",
      },
    ],
    "downGrandalarmBasic.grandalarmRate.rateFiveValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandfiveRatevalidate1,
        trigger: "blur",
      },
    ],
    "downGrandalarmBasic.grandalarmRate.rateFourValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandfourRatevalidate1,
        trigger: "blur",
      },
    ],
    "downGrandalarmBasic.grandalarmRate.rateThreeValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandthreeRatevalidate1,
        trigger: "blur",
      },
    ],
    "downGrandalarmBasic.grandalarmRate.rateTwoValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandtwoRatevalidate1,
        trigger: "blur",
      },
    ],
    "downGrandalarmBasic.grandalarmRate.rateOneValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: grandoneRatevalidate1,
        trigger: "blur",
      },
    ],
    "cutArea.areaIdList": [{
      required: true,
      message: "请选择",
      trigger: "change",
    }, ],
    "cutArea.cutValue": [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: validatecutValue,
        trigger: "blur",
      },
    ],
    "cutArea.resumeValue": [{
      required: true,
      message: "请输入",
      trigger: "blur",
    }, ],
    field_cutType: [{
      required: true,
      message: "请选择",
      trigger: "change",
    }, ],
    field_cutValue: [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: validatecutValue1,
        trigger: "blur",
      },
    ],
    field_resumeValue: [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: validatecutValue2,
        trigger: "blur",
      },
    ],
    field_stationPlaceName: [{
      required: true,
      message: "请选择",
      trigger: "change",
    }, ],
    // 多参测点
    field_mulalarmType: [{
      required: true,
      message: "请选择",
      trigger: "change",
    }, ],
    field_mulupAlarmValue: [{
      required: true,
      validator: mulupAlarmValuevalite,
      trigger: "blur",
    }, ],
    field_muldownAlarmValue: [{
      required: true,
      validator: muldownAlarmValuevalite,
      trigger: "blur",
    }, ],
    field_mulupPrealarmValue: [{
      required: true,
      message: "请输入",
      trigger: "blur",
    }, ],
    field_muldownPrealarmValue: [{
      required: true,
      message: "请输入",
      trigger: "blur",
    }, ],
    field_mulprealarmTimeout: [{
      required: true,
      message: "请选择",
      trigger: "change",
    }, ],
    field_mulconstantTime: [{
      required: true,
      message: "请输入",
      trigger: "blur",
    }, ],
    field_mulupthresholdValue: [{
      required: true,
      message: "请输入",
      trigger: "blur",
    }, ],
    field_muluprateCycle: [{
      required: true,
      message: "请输入",
      trigger: "blur",
    }, ],
    field_muldownthresholdValue: [{
      required: true,
      message: "请输入",
      trigger: "blur",
    }, ],
    field_muldownrateCycle: [{
      required: true,
      message: "请输入",
      trigger: "blur",
    }, ],
    field_mulcutType: [{
      required: true,
      message: "请选择",
      trigger: "change",
    }, ],
    field_mulcutValue: [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: mulmulcutValue,
        trigger: "blur",
      },
    ],
    field_mulresumeValue: [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: mulresumeValue,
        trigger: "blur",
      },
    ],
    field_mulcutValue1: [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: mulmulcutValue1,
        trigger: "blur",
      },
    ],
    field_mulresumeValue1: [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: mulresumeValue1,
        trigger: "blur",
      },
    ],
    field_mulstationPlaceName: [{
      required: true,
      message: "请选择",
      trigger: "change",
    }, ],
    field_mulcutAreaareaIdList: [{
      required: true,
      message: "请选择",
      trigger: "change",
    }, ],
    field_mulcutAreacutValue: [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: mulareacutValue,
        trigger: "blur",
      },
    ],
    field_mulcutArearesumeValue: [{
        required: true,
        message: "请输入",
        trigger: "blur",
      },
      {
        validator: mularearesumeValue,
        trigger: "blur",
      },
    ],
  });

  function getTemplateByStationCode(val) {
    axios.get('/station/getTemplateByStationCode?stationCode=' + val).then(res => {
      res.data.type = 'C'
      state.mobanTypeObjoverview = res.data
    })
  }
  // 点击操作列
  const cliclCaozuo = (n, obj) => {
    if (n == 1) {
      subStationInfo.value = obj;
      getStationPower(obj.stationCode);
      open_detail.value = true;
    } else if (n == 2) {
      subStationInfo.value = obj;
      getTemplateByStationCode(obj.stationCode)
    } else if (n == 3) {
      page.value = 2;
      channelList.value.forEach((item, index) => {
        if (obj.channelName == item.name) {
          sIndex.value = index;
          axios
            .post(`/station/containNetDetail`, {
              channelNo: obj.channelNo
            })
            .then((res) => {
              channelInfo.value = res.data.selectedNetworkList;
              channelInfo.value.forEach((item2, index2) => {
                if (item2.stationCode == obj.stationCode) {
                  chooseStation(item2, index2);
                  eidt_channel.value = true;
                }
              });
            });
        }
      });
    }
  };
  // 获取分站关联电源
  const getStationPower = (code) => {
    axios.post(`/power/station/ref`, {
      stationCode: code
    }).then((res) => {
      stationPowerList.value = res.data;

    });
  };
  // 分站使用模板
  const useTemp = () => {
    state.mobanTypeShow = false
    state.mobanType = 0
    state.tempDrawerShow = true
    if (tabPosition2.value == 1) {
      state.tempType = [{
        label: "分站模板",
        value: "C",
      }]
      state.mobanTypeValue = 'C'
    }
    if (tabPosition2.value == 2) {
      state.tempType = [{
        label: "电源模板",
        value: "D",
      }]
      state.mobanTypeValue = 'D'
    }
    getobtainTemplateCount()
  };

  // 点击隐藏设备列表
  const hiddDevice = () => {
    hiddDev.value = true;
  };

  // 点击分站
  const clicksSub = (obj, index) => {
    sIndex2.value = index;
    subStationInfo.value = obj;
    getControlPorts(obj.stationCode);
    getPointList(obj.stationCode);
    getPowerPoints(obj.stationCode);
    getPointCodes(obj.stationCode);
    if (subStationInfo.value.pointInfos == null) {
      subStationInfo.value.pointInfos = [];
    }
    showcedian.value = true;
    hiddDev.value = true;
  };
  // 切换测点和开出口
  const tabChange = (val) => {
    if (val == 1) {
      getPointList(subStationInfo.value.stationCode);
    }
    if (val == 2) {
      getPowerPoints(subStationInfo.value.stationCode);
    }
    if (val == 3) {
      getControlPorts(subStationInfo.value.stationCode);
    }
  };
  // 收起分站
  const closeSub = () => {
    showcedian.value = false;
    hiddDev.value = false;
    sIndex2.value = null;
  };
  // 扫描设备
  const scanDev = () => {
    hiddDev.value = false;
    showcedian.value = false;
    sIndex2.value = null;
    getDevtList();
    getDevs();
  };

  // 搜索
  const searchSatation = (val) => {
    form.value.key = val;
    getSubStation();
  };
  // 展开搜索框1
  const openSearch = () => {
    showInput.value = true;
    nextTick(() => {
      proxy.$refs["input1"].focus();
    });
  };
  // 展开搜索框2
  const openSearch2 = () => {
    showInput2.value = true;
    nextTick(() => {
      proxy.$refs["input2"].focus();
    });
  };
  // 展开搜索框3
  const openSearch3 = () => {
    showInput3.value = true;
    nextTick(() => {
      proxy.$refs["input3"].focus();
    });
  };

  // 获取分站列表
  const getSubStation = () => {
    axios.post("/station/list", form.value).then((res) => {
      subStationList.value = res.data.list;
    });
  };
  // 获取区域下拉
  const getAreaList = () => {
    axios.post("/area/info/searchTree", {}).then((res) => {
      areaList.value = res.data;
    });
    searchgetTimeList().then((res) => {
      res.data.forEach((item) => {
        state.TimeList.push(item);
      });
    });
    searchgetCapacityList().then((res) => {
      state.CapacityList = res.data;
    });
    searchgetPowerTypeList().then((res) => {
      state.PowerTypeList = res.data;
    });
  };
  // 馈电测点下拉 /controlPort/feedList
  const getFeedList = () => {
    axios.get("/controlPort/feedList").then((res) => {
      feedPointIdList.value = res.data;
    });
  };

  //
  const handleChange = (val) => {
    if (val != "") {
      getSubStation();
    } else {
      form.value.status = null;
      getSubStation();
    }
  };
  const handleChange3 = (val) => {
    if (val != "") {
      getSubStation();
    } else {
      form.value.status = null;
      getSubStation();
    }
  };

  // 获取设备列表
  const getDevtList = () => {
    axios.post("/point/allList", form2.value).then((res) => {
      devList.value = res.data;
    });
  };
  const handleChange2 = (val) => {
    if (val) {
      getDevtList();
    } else {
      form2.value = {};
      getDevtList();
    }
  };
  const handleChange4 = (val) => {
    if (val) {
      getDevtList();
    } else {
      form2.value = {};
      getDevtList();
    }
  };

  const controlNum = ref([])
  // 根据分站查开出口
  const getControlPorts = (id) => {
    controlNum.value = []
    axios.get(`/station/controlPorts?stationCode=${id}`).then((res) => {
      controlPorts.value = res.data;
      res.data.forEach(el => {
        if (el.controlPortType != null) {
          controlNum.value.push(el)
        }
      })
    });
  };

  const handleChange5 = (val) => {
    if (val) {
      getPointList(subStationInfo.value.stationCode);
      getPowerPoints(subStationInfo.value.stationCode);
    } else {
      form_point.value.status = null;
      getPointList(subStationInfo.value.stationCode);
      getPowerPoints(subStationInfo.value.stationCode);
    }
  };
  const handleChange6 = (val) => {
    if (val) {
      getPointList(subStationInfo.value.stationCode);
      getPowerPoints(subStationInfo.value.stationCode);
    } else {
      form_point.value.key = "";
      getPointList(subStationInfo.value.stationCode);
      getPowerPoints(subStationInfo.value.stationCode);
    }
  };
  // 根据分站查测点
  const getPointList = (id) => {
    form_point.value.stationCode = id;
    axios.post("/point/allList", form_point.value).then((res) => {
      pointList.value = res.data;
      pointNum.value = [];
      res.data.forEach((item) => {
        if (item.pointId != null) {
          pointNum.value.push(item);
        }
      });
    });
  };
  // 根据分站查电源测点
  const getPowerPoints = (id) => {
    form_point.value.stationCode = id;
    axios.post("/point/powerList", form_point.value).then((res) => {
      powerPointsList.value = res.data;
      powerPoints.value = [];
      res.data.forEach((item) => {
        if (item.pointId != null) {
          powerPoints.value.push(item);
        }
      });
    });
  };
  let state = reactive({
    // 模板变量开始
    editIdmoban: undefined,
    addModalTitle: '全部模板',
    tempDrawerShow: false,
    addtemModal: false,
    mobanType: undefined,
    mobanTypeValue: "C,D",
    tempType: [{
        label: "全部模板",
        value: "C,D",
      },
      {
        label: "分站模板",
        value: "C",
      },
      {
        label: "电源模板",
        value: "D",
      }
    ],
    useTempValue: undefined,
    mobanTypeShow: false,
    tabradio: undefined,
    mobanTypeObj: {},
    mobanTypeObjoverview: undefined,
    frompointConfigObj: {},
    hisCFDListaddModal: false,
    // 关联电源相关
    connectPoweraddModal: false,
    connectPowerpointsList: [],
    powermodifyselectRowsId: [],
    powermodifyList: [],
    powermodifyListformData: {},
    powermodifyListrules: {
      powerName: [{
        required: true,
        message: "请输入电源名称",
        trigger: "blur",
      }, ],
      powerTypeName: [{
        required: true,
        message: "请输入电源类型",
        trigger: "change",
      }, ],
      timeThreshold: [{
        required: true,
        message: "请选择时间门限",
        trigger: "change",
      }, ],
      capacityThreshold: [{
        required: true,
        message: "请选择容量门限",
        trigger: "change",
      }, ],
      controlPort: [{
        required: true,
        message: "请选择控制端口",
        trigger: "change",
      }, ],
      powerWay: [{
        required: true,
        message: "请选择电源路数",
        trigger: "change",
      }, ],
      powerNo: [{
        required: true,
        message: "请选择电源号",
        trigger: "change",
      }, ],
    },
    PowerTypeList: [],
    TimeList: [],
    CapacityList: [],
    powermodifyListaddModal: false,
  });
  // 打开分站编辑
  const open_editModal = () => {
    open_edit.value = true;
    open_detail.value = false;
    form_edit.value = subStationInfo.value;
    getpowermodify(subStationInfo.value.stationCode);
  };

  // 模板操作弹框
  const openAdd = (n) => {
    state.mobanTypeShow = !state.mobanTypeShow
    state.mobanType = n;
    state.editIdmoban = undefined;
    state.tabradio = "detail";
    getobtainTemplateCount()
  }

  function confirmAddClick(val) {
    getsider()

  }

  function tabmobanTypeClick(item) {
    state.mobanTypeValue = item.value
    state.mobanType = item.value
    state.useTempValue = false
  }

  function getobtainTemplateCount() {
    axios.get('templateStation/obtainTemplateCount').then(res => {
      if (tabPosition2.value == 1) {
        state.tempType[0].num = res.data.stationCount
      } else {
        state.tempType[0].num = res.data.powerCount
      }
    })
  }
  getobtainTemplateCount()

  function editClick(n) {
    state.mobanType = n.type
    state.tabradio = "detail";
    state.editIdmoban = n.id;
    state.mobanTypeShow = !state.mobanTypeShow
    state.mobanTypeObj = n
    getobtainTemplateCount()
  }
  // 重置按钮
  function reset() {
    state.mobanType = state.mobanTypeValue;
  }
  // 模板确定跳转列表页面
  function canceltemconfigCom() {
    state.useTempValue = false
    getobtainTemplateCount()
    state.mobanTypeShow = !state.mobanTypeShow
  }
  // 使用模板
  function useTempClick(item) {
    state.mobanType = undefined
    state.useTempValue = {
      item: item,
      stationObj: subStationInfo.value
    }
  }

  function returnClick() {
    state.mobanType = state.mobanTypeValue
    getobtainTemplateCount()
    state.mobanTypeShow = !state.mobanTypeShow
    state.useTempValue = false
  }
  const delTemp = (id) => {
    state.delTip = true;
    state.delId = id;
    getobtainTemplateCount()
  };

  // 点击分站详情中关联电源查看事件
  function connectPowerClick(item) {
    state.connectPoweraddModal = true;
    axios.post("/power/supply/points", {
      id: item.powerId
    }).then((res) => {
      state.connectPowerpointsList = res.data;
    });
  }
  // 历史充放电查看按钮
  function hiscfdClick(item) {
    state.hisCFDListaddModal = true;
    state.frompointConfigObj = item;
  }
  // 获取关联电源列表
  function getpowermodify(stationCode) {
    activeName.value = "1";
    axios
      .post("power/station/modify", {
        stationCode: stationCode,
      })
      .then((res) => {
        if (res.data != null) {
          state.powermodifyselectRowsId = [];
          res.data.forEach((item) => {
            if (item.stationCode != "无") {
              state.powermodifyselectRowsId.push(item.powerId);
              if (!form_edit.value.powerIds) {
                form_edit.value.powerIds = [];
              }
              form_edit.value.powerIds.push(item.powerId);
            }
          });
          state.powermodifyList = res.data;
        } else {
          state.powermodifyList = [];
        }
      });
  }
  // 关联电源列表
  function selectpowermodifyChangeEvent(e) {
    form_edit.value.powerIds = e.records.map((item) => {
      return item.powerId;
    });
  }
  // 新增关联电源
  function powermodifyListClick() {
    state.powermodifyListformData = {};
    state.powermodifyListaddModal = true;
  }

  function powermodifyListcancel() {
    state.powermodifyListaddModal = false;
  }

  function powermodifyListsubmitForm() {
    proxy.$refs["powermodifyListformRef"].validate((valid) => {
      if (valid) {
        axios
          .post("/power/supply/add", state.powermodifyListformData)
          .then((res) => {
            if (res.code == 200) {
              getpowermodify(subStationInfo.value.stationCode);
              state.powermodifyListaddModal = false;
              proxy.$modal.msgSuccess(res.msg);
            }
          });
      }
    });
  }

  // 获取安装地点下拉框数据
  const getAddressInfo = () => {
    axios.post("/place/info/addressInfo", {}).then((res) => {
      addressInfoList.value = res.data.list;
    });
  };

  // 获取所在区域下拉数据
  const getSearchTree = () => {
    axios.post("/area/info/searchTree", {}).then((res) => {
      searchTreeList.value = res.data;
    });
  };

  // 获取通道号
  const getChannelNoList = () => {
    axios.get("/station/channelNoList").then((res) => {
      channelNoList.value = res.data;
    });
  };

  // 通道号改变事件
  const channelNoChange = (val) => {
    channelNoList.value.forEach((item) => {
      if (val == item.id) {
        if (open_edit.value) {
          form_edit.value.channelName = item.name;
        } else {
          form_add.value.channelName = item.name;
        }
      }
    });
  };

  // 获取分站编号下拉数据
  const getStationCodes = () => {
    axios.get("/station/stationCodes").then((res) => {
      ationNosList.value = res.data;
    });
  };

  // 获取分站类型下拉数据 /substation/type/search
  const getSubstationType = () => {
    axios.post("/substation/type/search", {}).then((res) => {
      substationType.value = res.data.list;
    });
  };

  // 分站编号下拉事件
  const stationTypeChange = (val) => {
    substationType.value.forEach((item) => {
      if (val == item.id) {
        if (open_edit.value) {
          form_edit.value.stationInNum = item.stationInNum;
          form_edit.value.stationModelName = item.stationModelName;
        } else {
          form_add.value.stationInNum = item.stationInNum;
          form_add.value.stationModelName = item.stationModelName;
        }
      }
    });
  };

  // 新增分站提交
  const saveAdd = () => {
    formA.value.validate((valid) => {
      if (valid) {
        if (!form_add.value.isPlaceotherBreakfalg) {
          form_add.value.isPlaceotherBreakfalg = false;
        }
        if (!form_add.value.isGasDrainage) {
          form_add.value.isGasDrainage = false;
        }
        if (!form_add.value.isNetwork) {
          form_add.value.isNetwork = false;
        }
        if (!form_add.value.noOldprotocolSensor) {
          form_add.value.noOldprotocolSensor = false;
        }
        if (!form_add.value.continuation) {
          form_add.value.continuation = false;
        }
        if (!form_add.value.pointCutBroken) {
          form_add.value.pointCutBroken = false;
        }
        if (!form_add.value.rsBreakerState) {
          form_add.value.rsBreakerState = false;
        }
        axios.post("/station/add", form_add.value).then((res) => {
          if (res.code == 200) {
            ElMessage.success("操作成功");
            open_add.value = false;
            getSubStation();
            activeName.value = "2";
            getStationCodes();
          }
        });
      }
    });
  };

  // 编辑分站提交
  const saveEdit = () => {
    formE.value.validate((valid) => {
      if (valid) {
        axios.post("/station/edit", form_edit.value).then((res) => {
          if (res.code == 200) {
            ElMessage.success("操作成功");
            open_edit.value = false;
            getSubStation();
            activeName.value = "1";
          }
        });
      }
    });
  };
  // 获取测点编号下拉
  const getPointCodes = (code) => {
    axios.get(`/point/pointCodes?stationCode=${code}`).then((res) => {
      pointNoList.value = res.data;
    });
  };
  // 打开新增测点方法
  const addPointFn = (n, item) => {
    if (n == 1) {
      showPointAdd2.value = true;
    }
    showPointAdd.value = item;
    form_add2.value.stationCode = subStationInfo.value.stationCode;
  };
  // 打开新增测点弹窗
  const open_addPoint = (n, code, pCode) => {
    open_add2.value = true;
    editpointId.value = null;
    if (pCode) {
      form_add2.value.pointCode = pCode;
    }
    showPointAdd.value = false;
    showPointAdd2.value = false;
    form_add2.value.pointType = n;
    if (n == 3) {
      pointactiveNameList.value = [{
        name: "报警配置",
        type: 1,
      }, ];
    }
    form_add2.value.isGasDrainage = false;
    form_add2.value.prealarmBasic.prealarmTimeout = 0;
  };
  // 点击多参测点tab切换
  const handleClick = () => {
    activeNamePoint.value = "1";
    if (mulactiveNamePoint.value.includes("D")) {
      pointactiveNameList.value = [{
          name: "报警配置",
          type: 1,
        },
        {
          name: "普通断电",
          type: 3,
        },
      ];
    } else {
      pointactiveNameList.value = [{
          name: "报警配置",
          type: 1,
        },
        {
          name: "分级配置",
          type: 2,
        },
        {
          name: "普通断电",
          type: 3,
        },
        {
          name: "区域断电",
          type: 4,
        },
      ];
    }
  };

  // 测点类型选择事件
  const pointTypeChange = (val) => {
    form_add2.sensorId = undefined;
    if (val != 3) {
      expressionVoList.value = [];
    }
  };

  // 获取多参传感器下拉数据
  const getSensorList = () => {
    axios.get("/point/sensor").then((res) => {
      let newc = [];
      res.data.forEach((item) => {
        item.label = item.name;
        item.value = item.name;
        if (item.sensors) {
          item.children = item.sensors;
          item.sensors.forEach((item1) => {
            item1.label = item1.sensorName;
            item1.value = item1.sensorId;
            if (item1.childIndexList) {
              newc = item1.childIndexList.map((item2) => {
                return {
                  label: item2.childIndexName,
                  value: item2.sensorId,
                  data: item2,
                };
              });
              item1.children = newc;
            }
          });
        }
      });
      sensorIdList.value = res.data;
    });
  };
  // 获取多参传感器下拉数据
  const getMultipleSensorList = () => {
    axios.post("/sensor/multiple/list", {}).then((res) => {
      mulsensorIdList.value = res.data.list;
    });
  };

  // 多参传感器名称下拉事件
  const mulsensorIdChange = (val) => {
    mulsensorIdList.value.forEach((item) => {
      if (item.id == val) {
        needPlaceType.value = item.needPlaceType;
      }
    });
    if (val) {
      getlooksensorObj(val);
    }
  };

  // 查看传感器参数详情接口
  const getlooksensorObj = (val) => {
    axios.get("/sensor/multiple/detail?id=" + val).then((res) => {
      looksensorObj.value = res.data;
      let arr = [];
      res.data.sensorList.forEach((item) => {
        item.baohanD = formatCloud(item.sensorId);
        item.obj = {
          hasUpGrandAlarm: false,
          hasDownGrandAlarm: false,
          hasMoreGrandAlarm: false,
          hasChangeGrandAlarm: false,
          alarmBasic: {
            alarmType: 0,
          },
          prealarmBasic: {
            hasPreAlarm: false,
            hasConstantPreAlarm: false,
          },
          upGrandalarmBasic: {
            grandalarmRate: {},
          },
          downGrandalarmBasic: {
            grandalarmRate: {},
          },
          cutArea: {},
          cutValueList: [{
            title: "断电配置",
            name: "1",
            cutStationList: [{}],
          }, ],
        };
        if (item.childIndexName != null) {
          arr.push(item);
        }
      });
      mulactiveNamePoint.value = res.data.sensorList[0].sensorId;
      form_add2.value.multiplePointBranchList = arr;
    });
  };
  // 过滤器
  const formatCloud = (str) => {
    return str.charAt(0);
  };

  // 普通传感器名称下拉事件
  const chuangantreeChange = (data, node) => {
    let alarmtypeList = [];
    let newdata = undefined;
    data = cascaderValue.value.getCheckedNodes()[0].data;
    if (!data.data) {
      newdata = data;
    } else {
      newdata = data.data;
    }
    if (newdata) {
      needPlaceType.value = newdata.needPlaceType;
      baohanunit.value = newdata.sensorUnit;
      if (newdata.needGrandalarm || newdata.needGrandalarm != null) {
        form_add2.value.needGrandalarm = newdata.needGrandalarm;
      }
      scaleDown.value = newdata.scaleDown;
      scaleUp.value = newdata.scaleUp;
      form_add2.value.alarmBasic.alarmType = newdata.alarmType;
      form_add2.value.alarmBasic.upAlarmValue = newdata.upAlarmValue;
      form_add2.value.alarmBasic.upRelieveValue = newdata.upRelieveValue;
      form_add2.value.alarmBasic.downAlarmValue = newdata.downAlarmValue;
      form_add2.value.alarmBasic.downRelieveValue = newdata.downRelieveValue;
      if (newdata.sensorId && newdata.sensorId != null) {
        baohanD.value = formatCloud(newdata.sensorId);
        if (baohanD.value == "D") {
          if (newdata.highShow != null) {
            alarmtypeList.push({
              code: 1,
              name: newdata.highShow,
            });
          }
          if (newdata.lowShow != null) {
            alarmtypeList.push({
              code: 2,
              name: newdata.lowShow,
            });
          }
          alarmBasicList.value = alarmtypeList;
          cutTypeList.value = alarmtypeList;
        } else {
          alarmBasicList.value = [{
              code: 0,
              name: "无",
            },
            {
              code: 1,
              name: "上限",
            },
            {
              code: 2,
              name: "下限",
            },
            {
              code: 3,
              name: "上下限",
            },
          ];
          cutTypeList.value = [{
              code: 1,
              name: "上限",
            },
            {
              code: 2,
              name: "下限",
            },
          ];
        }
      }
    }
  };

  // 获取模板名称列表
  const getTemplateTree = () => {
    axios.get("/template/expression/getTemplateTree").then((res) => {
      templateTreeList.value = res.data;
    });
  };

  // 获取地点类型下拉数据
  const getTypesInfo = () => {
    axios.post("/place/type/typesInfo", {}).then((res) => {
      placeTypeIdList.value = res.data.list;
    });
  };

  // 测点tab切换--关联电源/其他配置/操作日志
  let tableRef2 = ref();
  const ponitactiveNameTabClick = (type) => {
    activeNamePoint.value = type;
    if (type == 3) {
      getcontrolPortsList(datatreeCode.value);
      let arr = [];
      form_add2.value.cutValueList.forEach((item) => {
        item.cutStationList.forEach((item2) => {
          item2.controlPortList.forEach((item3) => {
            if (item3.selected) {
              arr.push(item3);
            }
          });
        });
      });
      nextTick(() => {
        tableRef2.value[0].setCheckboxRow(arr, true);
      });
    }
    if (type == 4) {
      if (form_add2.value.cutArea == null) {
        form_add2.value.cutArea = {};
      }
    }
  };

  const getcontrolPortsList = (val) => {
    axios.post("/station/list", {}).then((res) => {
      stationPlaceNamList.value = res.data.list;
    });
  };

  // 预报警全部详情
  const hasPreAlarmdescClick = () => {
    addModalhasPreAlarm.value = true;
    getalldescList(hasPreAlarmData.value.query);
    getalldescselList();
  };
  // 全部详情列表数据
  const getalldescList = (data) => {
    axios.post("/point/constantList", data).then((res) => {
      hasPreAlarmData.value.tabledata = res.data.list;
      hasConstantPreAlarmData.value.tabledata = res.data.list;
      hasPreAlarmData.value.total = res.data.total;
      hasConstantPreAlarmData.value.total = res.data.total;
    });
  };
  // 全部详情下拉接口
  const getalldescselList = () => {
    axios.post("/point/queryAllName", {}).then((res) => {
      hasPreAlarmData.value.selList = res.data;
      hasConstantPreAlarmData.value.selList = res.data;
    });
  };
  // 恒值预报警全部详情
  const hasConstantPreAlarmdescClick = () => {
    addModalhasConstantPreAlarm.value = true;
    getalldescList(hasConstantPreAlarmData.value.query);
    getalldescselList();
  };
  // 上限分级报警开关
  const hasUpGrandAlarmChange = (val) => {
    radio1.value = "上限分级报警";
    if (form_add2.value.hasDownGrandAlarm) {
      radio1.value = "下限分级报警";
    }
  };
  const hasDownGrandAlarmChange = (val) => {
    radio1.value = "下限分级报警";
    if (!val) {
      radio1.value = "上限分级报警";
    }
  };
  // 新增断电配置
  const putongAddClick = () => {
    if (form_add2.value.pointType == 1) {
      if (form_add2.value.cutValueList == null) {
        form_add2.value.cutValueList = [];
      }
      form_add2.value.cutValueList.push({
        title: "断电配置",
        name: 1,
        cutStationList: [{}],
      });
    }
    if (form_add2.value.pointType == 2) {
      form_add2.value.multiplePointBranchList.forEach((item) => {
        if (mulactiveNamePoint.value == item.sensorId) {
          if (item.obj.cutValueList != null) {
            item.obj.cutValueList.push({
              title: "断电配置",
              name: 1,
              cutStationList: [{}],
            });
          } else {
            item.obj.cutValueList = [];
            item.obj.cutValueList.push({
              title: "断电配置",
              name: 1,
              cutStationList: [{}],
            });
          }
        }
      });
    }
  };
  // 删除断电配置
  const removeTab = (val) => {
    if (form_add2.value.pointType == 1) {
      if (val == 0) {
        form_add2.value.cutValueList.splice(val, 1);
      } else {
        form_add2.value.cutValueList.splice(val, 1);
      }
    }
    if (form_add2.value.pointType == 2) {
      form_add2.value.multiplePointBranchList.forEach((item) => {
        if (mulactiveNamePoint.value == item.sensorId) {
          item.obj.cutValueList.splice(val, 1);
        }
      });
    }
  };

  const addcutdeviceClick = () => {
    if (form_add2.value.pointType == 1) {
      form_add2.value.cutValueList.forEach((item, index) => {
        if (ordintranValue.value == index) {
          item.cutStationList.push({});
        }
      });
    }
    if (form_add2.value.pointType == 2) {
      form_add2.value.multiplePointBranchList.forEach((item) => {
        if (mulactiveNamePoint.value == item.sensorId) {
          item.obj.cutValueList.forEach((item, index) => {
            if (ordintranValue.value == index) {
              item.cutStationList.push({});
            }
          });
        }
      });
    }
  };

  // 点击el-collapse-item
  const clickCollapse = (item, index) => {
    item.controlPortList.forEach((row) => {
      if (row.selected) {
        tableRef2.value[index].setCheckboxRow(row, true);
      }
    });
  };
  // el-collapse-item阻止冒泡
  const stopCollapse = (e) => {
    return e.stopPropagation();
  };

  const fenzhankaichuList = (controlPort) => {
    return new Promise((resolve, reject) => {
      controlPortsList(controlPort).then((res) => {
        resolve(res.data);
      });
    });
  };

  // 断电-配置列表
  async function getcutconfigId(e, val) {
    let arr = await fenzhankaichuList(e);
    if (form_add2.value.pointType == 1) {
      // if (collapseAtive.value == val) {
      form_add2.value.cutValueList.forEach((item1, index) => {
        if (ordintranValue.value == index) {
          if (!item1.cutStationList) {
            item1.cutStationList = [{}];
          }
          if (val) {
            if (!item1.cutStationList[val].controlPortList) {
              item1.cutStationList[val].controlPortList = [];
            }
            item1.cutStationList[val].controlPortList.forEach((item2, index2) => {
              arr[index2].selected = item2.selected;
            });
            item1.cutStationList[val].controlPortList = arr;
          } else {
            item1.cutStationList.forEach((item) => {
              if (item.stationCode == e) {
                item.controlPortList = arr;
              }
            });
          }
        }
      });
      // }
    }
    if (form_add2.value.pointType == 2) {
      form_add2.value.multiplePointBranchList.forEach((item0) => {
        if (mulactiveNamePoint.value == item0.sensorId) {
          // if (collapseAtive.value == val) {
          item0.obj.cutValueList.forEach((item1, index) => {
            if (ordintranValue.value == index) {
              if (!item1.cutStationList) {
                item1.cutStationList = [{}];
              }
              if (val) {
                if (!item1.cutStationList[val].controlPortList) {
                  item1.cutStationList[val].controlPortList = [];
                }
                item1.cutStationList[val].controlPortList.forEach(
                  (item2, index2) => {
                    arr[index2].selected = item2.selected;
                  }
                );
                item1.cutStationList[val].controlPortList = arr;
              } else {
                item1.cutStationList.forEach((item) => {
                  if (item.stationCode == e) {
                    item.controlPortList = arr;
                  }
                });
              }
              // item1.cutStationList[val].controlPortList.forEach((item2,index2) => {
              //   arr[index2].selected = item2.selected
              // });
              // item1.cutStationList[val].controlPortList = arr;
            }
          });
          // }
        }
      });
    }
  }

  async function controlPortChange(e, val) {
    collapseAtive.value = val;
    cutconfigId.value = e;
    if (form_add2.value.pointType == 1) {
      if (collapseAtive.value == val) {
        await stationPlaceNamList.value.forEach((item) => {
          if (e == item.stationCode) {
            form_add2.value.cutValueList.forEach((item1, index) => {
              if (ordintranValue.value == index) {
                item1.cutStationList[val].stationCode = item.stationCode;
                item1.cutStationList[val].stationPlaceName =
                  item.stationPlaceName;
                getcutconfigId(e, val);
              }
            });
          }
        });
      }
    }
    if (form_add2.value.pointType == 2) {
      await form_add2.value.multiplePointBranchList.forEach((item0) => {
        if (mulactiveNamePoint.value == item0.sensorId) {
          if (collapseAtive.value == val) {
            stationPlaceNamList.value.forEach((item) => {
              if (e == item.stationCode) {
                item0.obj.cutValueList.forEach((item1, index) => {
                  if (ordintranValue.value == index) {
                    item1.cutStationList[val].stationCode = item.stationCode;
                    item1.cutStationList[val].stationPlaceName =
                      item.stationPlaceName;
                    getcutconfigId(e, val);
                  }
                });
              }
            });
          }
        }
      });
    }
    cutconfigIdTypestation.value = e;
  }

  // 表格禁用状态
  const checkboxConfig = reactive({
    checkMethod: ({
      row
    }) => {
      return row.controlPortType != null;
    },
  });

  // 表格选中事件
  const selectChangeEvent = (e) => {
    form_add2.value.cutValueList.forEach((item) => {
      item.cutStationList.forEach((item2) => {
        if (item2.stationCode == e.row.stationCode) {
          item2.controlPortList.forEach((item3) => {
            if (item3.controlPort == e.row.controlPort) {
              item3.selected = false;
            }
          });
        }
      });
    });
    e.records.forEach((item) => {
      item.selected = true;
    });
  };

  // 测点普通断电-配置按钮
  const pointputongConfigClick = (row) => {
    addModalconfig.value = true;
    formDataconfig.value = {};
    cutconfigIdTypereq.value = row.controlPortType;
    formDataconfig.value = row;
    formDataconfig.value.controlPort = row.controlPort;
    formDataconfig.value.stationCode = row.stationCode;
  };

  // 开出口-控制设备下拉事件
  const controlPortTypeChange = (val) => {
    controlPortTypeList.value.forEach((item) => {
      if (val == item.code) {
        formData2.value.controlPortTypeName = item.name;
        form_add.value.controlPortTypeName = item.name;
      }
    });
    if (val == 2) {
      formData2.value.feedPointId = undefined;
      form_add.value.feedPointId = undefined;
    }
  };

  // 开出口馈电测点下拉事件
  const feedPointIdChange = (val) => {
    feedPointIdList.value.forEach((item) => {
      if (val == item.pointId) {
        formData2.value.pointPlaceName = item.pointPlaceName;
        form_add.value.pointPlaceName = item.pointPlaceName;
      }
    });
  };

  // 配置确定按钮
  const onSubmitConfigClick = () => {
    let dom;
    if (proxy.$refs["formRefconfig"].length == 1) {
      dom = proxy.$refs["formRefconfig"][0];
    } else {
      dom = proxy.$refs["formRefconfig"];
    }
    dom.validate((valid) => {
      if (valid) {
        if (cutconfigIdTypereq.value != null) {
          axios.post("/controlPort/edit", formDataconfig.value).then((res) => {
            proxy.$modal.msgSuccess(res.msg);
            getcutconfigId(formDataconfig.value.stationCode);
            // getponitdetailData(editpointId.value)
            addModalconfig.value = false;
          });
        } else {
          axios.post("/controlPort/add", formDataconfig.value).then((res) => {
            proxy.$modal.msgSuccess(res.msg);
            getcutconfigId(formDataconfig.value.stationCode);
            // getponitdetailData(editpointId.value)
            addModalconfig.value = false;
          });
        }
      }
    });
  };

  // 配置取消按钮
  const cancelConfigClick = () => {
    addModalconfig.value = false;
  };

  // 获取区域信息
  getinfosearchAll().then((res) => {
    infosearchAllList.value = res.data.list;
  });

  const chuangantreeChange1 = (val) => {
    let arr = findParentArr(val, hasPreAlarmData.value.selList);
    hasPreAlarmData.value.query.condition = arr.toString().replace(/,/g, "");
  };

  const chuangantreeChange2 = (val) => {
    let arr = findParentArr(val, hasPreAlarmData.value.selList);
    hasConstantPreAlarmData.value.query.condition = arr
      .toString()
      .replace(/,/g, "");
  };

  // 获取父级id
  const findParentArr = (targetId, mock) => {
    const ids = [];

    function getParent(sources) {
      if (Array.isArray(sources)) {
        return sources.find((elm) => {
          let rs = getParent(elm);
          if (rs) {
            ids.push(elm.code);
          }
          return rs;
        });
      }
      if (sources.code === targetId) {
        return true;
      }
      if (Array.isArray(sources.children)) {
        return getParent(sources.children);
      }
    }
    getParent(mock);
    ids.reverse();
    return ids;
  };

  // 全部详情查询
  const yinyonClick = () => {
    getalldescList(hasPreAlarmData.value.query);
  };

  // 重置全部详情
  const cancelyinyonClick = () => {
    hasPreAlarmData.value.condition = "";
    hasPreAlarmData.value.query.condition = "";
    getalldescList(hasPreAlarmData.value.query);
  };

  const yubaojingConfigClick = (row) => {
    baohanD.value = formatCloud(row.deviceId);
    form_add2.value.prealarmBasic.hasPreAlarm = true;
    form_add2.value.prealarmBasic.upPrealarmValue = row.upPrealarmValue;
    form_add2.value.prealarmBasic.downPrealarmValue = row.downPrealarmValue;
    form_add2.value.prealarmBasic.prealarmTimeout = row.prealarmTimeout;
    addModalhasPreAlarm.value = false;
  };

  const hasPreAlarmpagechange = () => {
    getalldescList(hasPreAlarmData.value.query);
  };

  // 全部详情查询
  const yinyonClick1 = () => {
    getalldescList(hasConstantPreAlarmData.value.query);
  };
  // 重置全部详情
  const cancelyinyonClick1 = () => {
    hasConstantPreAlarmData.value.condition = "";
    hasConstantPreAlarmData.value.query.condition = "";
    getalldescList(hasConstantPreAlarmData.value.query);
  };

  const hengbaojingConfigClick = (row) => {
    baohanD.value = formatCloud(row.deviceId);
    form_add2.value.prealarmBasic.hasConstantPreAlarm = true;
    form_add2.value.prealarmBasic.constantTime = row.constantTime;
    addModalhasConstantPreAlarm.value = false;
  };
  // 使用日志接口
  function useLog(data) {
    axios.post('/templateUsageLog/addTemplateUsageLog', data)
  }

  // 新增测点提交
  const addpointClick = () => {
       if (isEmpty(form_add2.value.cutArea.areaIdList) && 
            isEmpty(form_add2.value.cutArea.cutValue) && isEmpty(
                    form_add2.value.cutArea.resumeValue)) {
                rules1['cutArea.areaIdList'][0].required=false
                rules1['cutArea.cutValue'][0].required=false
                rules1['cutArea.resumeValue'][0].required=false
            }else{
                rules1['cutArea.areaIdList'][0].required=true
                rules1['cutArea.cutValue'][0].required=true
                rules1['cutArea.resumeValue'][0].required=true 
            }
            if(form_add2.value.multiplePointBranchList&&form_add2.value.multiplePointBranchList.length>0){
                form_add2.value.multiplePointBranchList.forEach(item=>{
                    if(_.isEmpty(item.cutArea)){
                            rules1.field_mulcutAreaareaIdList[0].required=false
                            rules1.field_mulcutAreacutValue[0].required=false
                            rules1.field_mulcutArearesumeValue[0].required=false
                    }else{
                        rules1.field_mulcutAreaareaIdList[0].required=true
                        rules1.field_mulcutAreacutValue[0].required=true
                        rules1.field_mulcutArearesumeValue[0].required=true
                    }
                })
            }
    proxy.$refs["formRef1"].validate((valid) => {
      if (valid) {
        if (form_add2.value.pointType == 1) {
          let newarr = [];
          newarr = form_add2.value.cutValueList;
          if (newarr != null) {
            if (newarr.length > 0) {
              newarr.forEach((item) => {
                item.cutStationList.forEach((item1) => {
                  let arrr = [];
                  if (item1.controlPortList && item1.controlPortList.length > 0) {
                    item1.controlPortList.forEach((item2) => {
                      if (item2.selected == true) {
                        arrr.push(item2);
                      }
                    });
                    item1.controlPortList = arrr;
                  }
                });
              });
            }
          }
          // form_add2.value.cutValueList = newarr
          form_add2.value.pointId = editpointId.value;
          if (editpointId.value) {
            axios.post(ponitEditUrl.value, form_add2.value).then((res) => {
              if (res.code == 200) {
                proxy.$modal.msgSuccess(res.msg);
                // getsider()
                editpointId.value = undefined;
                open_add2.value = false;
                getPointList(subStationInfo.value.stationCode);
                getPowerPoints(subStationInfo.value.stationCode);
              }
            });
          } else {
            axios.post(ponitAddUrl.value, form_add2.value).then((res) => {
              if (res.code == 200) {
                proxy.$modal.msgSuccess(res.msg);
                // getsider()
                // editpointId.value = undefined
                form_add2.value.cutValueList = [{
                  title: "断电配置",
                  name: 1,
                  cutStationList: [{}],
                }, ];
                open_add2.value = false;
                closeMoadl();
                getPointList(subStationInfo.value.stationCode);
                getPowerPoints(subStationInfo.value.stationCode);
                getponitdetailData(
                  form_add2.value.stationCode +
                  formatCloud(form_add2.value.sensorId) +
                  form_add2.value.pointCode
                );
              }
            });
          }
        }
        if (form_add2.value.pointType == 2) {
          form_add2.value = delObj(form_add2.value, [
            "hasUpGrandAlarm",
            "hasDownGrandAlarm",
            "hasMoreGrandAlarm",
            "hasChangeGrandAlarm",
            "alarmBasic",
            "prealarmBasic",
            "upGrandalarmBasic",
            "downGrandalarmBasic",
            "cutArea",
            "cutValueList",
          ]);
          form_add2.value.multiplePointBranchList.forEach((item) => {
            Object.assign(item, item.obj);
            delete item.obj;
          });
          form_add2.value.pointId = editpointId.value;
          if (editpointId.value) {
            axios.post("/point/editMultiple", form_add2.value).then((res) => {
              if (res.code == 200) {
                proxy.$modal.msgSuccess(res.msg);
                open_add2.value = false;
                getPointList(subStationInfo.value.stationCode);
                getPowerPoints(subStationInfo.value.stationCode);
                getponitdetailData(
                  form_add2.value.stationCode + "M" + form_add2.value.pointCode
                );
                closeMoadl();
              }
            });
          } else {
            axios.post("/point/addMultiple", form_add2.value).then((res) => {
              if (res.code == 200) {
                proxy.$modal.msgSuccess(res.msg);
                open_add2.value = false;
                getPointList(subStationInfo.value.stationCode);
                getPowerPoints(subStationInfo.value.stationCode);
                getponitdetailData(
                  form_add2.value.stationCode + "M" + form_add2.value.pointCode
                );
                closeMoadl();
              }
            });
          }
        }
        if (form_add2.value.pointType == 3) {
          let newarr = [];
          newarr = form_add2.value.cutValueList;
          if (newarr != null) {
            if (newarr.length > 0) {
              newarr.forEach((item) => {
                item.cutStationList.forEach((item1) => {
                  let arrr = [];
                  if (item1.controlPortList && item1.controlPortList.length > 0) {
                    item1.controlPortList.forEach((item2) => {
                      if (item2.selected == true) {
                        arrr.push(item2);
                      }
                    });
                    item1.controlPortList = arrr;
                  }
                });
              });
            }
          }
          let arrr = [];
          expressionVoList.value.forEach((item) => {
            if (item.obj) {
              arrr.push({
                sensorId: item.obj.code,
                pointName: item.value,
              });
            }
          });
          form_add2.value.pointIdList = arrr;
          form_add2.value.pointId = editpointId.value;
          if (editpointId.value) {
            useLog({
              templateType: "公式",
              templateName: form_add2.value.sensorName,
              usageUser: "编辑" + form_add2.value.pointId
            })
            axios.post("point/editVirtual", form_add2.value).then((res) => {
              if (res.code == 200) {
                proxy.$modal.msgSuccess(res.msg);
                editpointId.value = undefined;
                open_add2.value = false;
                getPointList(subStationInfo.value.stationCode);
                getPowerPoints(subStationInfo.value.stationCode);
                closeMoadl();
              }
            });
          } else {
            useLog({
              templateType: "公式",
              templateName: form_add2.value.sensorName,
              usageUser: "新增" + form_add2.value.stationCode + 'M' + form_add2.value
                .pointCode
            })
            axios.post("point/addVirtual", form_add2.value).then((res) => {
              if (res.code == 200) {
                proxy.$modal.msgSuccess(res.msg);
                form_add2.value.cutValueList = [{
                  title: "断电配置",
                  name: 1,
                  cutStationList: [{}],
                }, ];
                open_add2.value = false;
                getPointList(subStationInfo.value.stationCode);
                getPowerPoints(subStationInfo.value.stationCode);
                getponitdetailData(
                  form_add2.value.stationCode +
                  formatCloud(form_add2.value.sensorId) +
                  form_add2.value.pointCode
                );
                closeMoadl();
              }
            });
          }
        }
      }
    });
    // getSelList()
  };

  //获取普通测点详情数据
  const getponitdetailData = (id, num) => {
    // cutValueListyou.value = true
    if (num) {
      activeNamePoint.value = num;
    } else {
      activeNamePoint.value = 1;
    }
    let ponitdetailUrl2 = ponitdetailUrl.value;
    if (id.includes("M")) {
      ponitdetailUrl2 = "/point/detailMultiple";
    } else if (id.includes("V")) {
      ponitdetailUrl2 = "point/detailVirtual";
    } else {
      ponitdetailUrl2 = ponitdetailUrl.value;
    }
    let alarmtypeList = [{
      code: 0,
      name: "无",
    }, ];
    let alarmtypeList2 = [];
    axios.get(ponitdetailUrl2 + `?pointId=` + id).then((res) => {
      form_add2.value = res.data;
      if (!id.includes("M")) {
        if (form_add2.value.prealarmBasic.prealarmTimeout == null) {
          form_add2.value.prealarmBasic.prealarmTimeout = 0;
        }
      }
      needPlaceType.value = form_add2.value.needPlaceType;
      curTreeId.value = form_add2.value.pointId;
      if (id.includes("M")) {
        form_add2.value.sensorId = Number(form_add2.value.sensorId);
        axios
          .get("/sensor/multiple/detail?id=" + form_add2.value.sensorId)
          .then((res) => {
            looksensorObj.value = res.data;
          });
        let arr1 = form_add2.value.multiplePointBranchList;
        mulactiveNamePoint.value = arr1[0].sensorId;
        arr1.forEach((item) => {
          item.baohanD = formatCloud(item.sensorId);
          if (item.cutValueList != null && item.cutValueList.length > 0) {
            item.cutValueList.forEach((item11, index11) => {
              item11.title = "断电配置";
              item11.name = Number(index11) + 1;
              if (item11.cutStationList) {
                if (item11.cutStationList.length > 0) {
                  item11.cutStationList.forEach((item3) => {
                    if (item3.controlPortList) {
                      if (item3.controlPortList.length > 0) {
                        let rrrr = [];
                        item3.controlPortList.map((item4) => {
                          if (item4.selected == true) {
                            rrrr.push(item4);
                          }
                          return rrrr;
                        });
                        item3.controlPortList = rrrr;
                      }
                    }
                  });
                }
              }
            });
          }
          if (item.cutArea != null) {
            let areaIdList = item.cutArea.areaIdList.map((item3) => {
              return Number(item3);
            });
            item.cutArea.areaIdList = areaIdList;
          } else {
            item.cutArea = {
              areaIdList: undefined,
              cutValue: undefined,
              resumeValue: undefined,
            };
          }
          item.obj = item;
          if (item.obj.upGrandalarmBasic == null) {
            item.obj.upGrandalarmBasic = {};
          }
          if (item.obj.downGrandalarmBasic == null) {
            item.obj.downGrandalarmBasic = {};
          }
          // return item
        });
        form_add2.value.multiplePointBranchList = arr1;
      } else {
        if (form_add2.value.pointType == 3) {
          getbiaodashiList(form_add2.value.templateId);
          if (form_add2.value.pointId.includes("D")) {
            baohanD.value = "D";
          }
        } else {
          baohanD.value = formatCloud(form_add2.value.sensorId);
        }

        if (form_add2.value.cutArea && form_add2.value.cutArea != null) {
          if (form_add2.value.cutArea.areaIdList) {
            if (form_add2.value.cutArea.areaIdList.length > 0) {
              form_add2.value.cutArea.areaIdList =
                form_add2.value.cutArea.areaIdList.map((item) => {
                  return Number(item);
                });
            }
          }
        } else {
          form_add2.value.cutArea = null;
        }
        if (baohanD.value == "D") {
          if (form_add2.value.highShow != null) {
            alarmtypeList.push({
              code: 1,
              name: form_add2.value.highShow,
            });
            alarmtypeList2.push({
              code: 1,
              name: form_add2.value.highShow,
            });
          }
          if (form_add2.value.lowShow != null) {
            alarmtypeList.push({
              code: 2,
              name: form_add2.value.lowShow,
            });
            alarmtypeList2.push({
              code: 2,
              name: form_add2.value.lowShow,
            });
          }
          alarmBasicList.value = alarmtypeList;
          cutTypeList.value = alarmtypeList2;
        } else {
          alarmBasicList.value = [{
              code: 0,
              name: "无",
            },
            {
              code: 1,
              name: "上限",
            },
            {
              code: 2,
              name: "下限",
            },
            {
              code: 3,
              name: "上下限",
            },
          ];
          cutTypeList.value = [{
              code: 1,
              name: "上限",
            },
            {
              code: 2,
              name: "下限",
            },
          ];
        }
        if (form_add2.value.upGrandalarmBasic == null) {
          form_add2.value.upGrandalarmBasic = {
            grandalarmRate: {
              thresholdValue: "",
              rateCycle: "",
            },
          };
        } else {
          if (form_add2.value.upGrandalarmBasic.grandalarmRate == null) {
            form_add2.value.upGrandalarmBasic.grandalarmRate = {
              thresholdValue: "",
            };
            form_add2.value.upGrandalarmBasic.grandalarmRate = {
              rateCycle: "",
            };
          }
        }
        if (form_add2.value.downGrandalarmBasic != null) {
          if (form_add2.value.downGrandalarmBasic.grandalarmRate == null) {
            form_add2.value.downGrandalarmBasic.grandalarmRate = {
              thresholdValue: "",
            };
            form_add2.value.downGrandalarmBasic.grandalarmRate = {
              rateCycle: "",
            };
          }
        } else {
          form_add2.value.downGrandalarmBasic = {
            grandalarmRate: {
              thresholdValue: "",
              rateCycle: "",
            },
          };
        }
        if (form_add2.value.hasUpGrandAlarm) {
          radio1.value = "上限分级报警";
        }
        if (form_add2.value.cutValueList != null) {
          if (form_add2.value.cutValueList.length > 0) {
            if (cutValueListyou.value == true) {
              let arr = [];
              form_add2.value.cutValueList.forEach((item, index) => {
                item.cutStationList.forEach((item2) => {
                  item2.controlPortList.forEach((item3) => {
                    if (item3.selected == true) {
                      item3.stationCode = item2.stationCode;
                      item3.stationPlaceName = item2.stationPlaceName;
                      arr.push(item3);
                    }
                  });
                  item2.controlPortList = arr;
                });
              });
            } else {
              form_add2.value.cutValueList.forEach((item, index) => {
                item.title = "断电配置";
                item.name = index + 1;
              });
            }
          }
        }
      }
    });
  };

  const getbiaodashiList = (id) => {
    let arr = [];
    axios.get("/template/expression/getExpressionVo/" + id).then((res) => {
      let expressionList = res.data.expressionList.map((item) => {
        return {
          value: item,
          obj: undefined,
        };
      });
      for (let i = 0; i < expressionList.length; i++) {
        Object.keys(res.data.templateNodeMap).map(async (item) => {
          if (expressionList[i].value == item) {
            if (form_add2.value.virtualPointMap) {
              if (form_add2.value.virtualPointMap != null) {
                expressionList[i].value =
                  form_add2.value.virtualPointMap[item].pointName;
                expressionList[i].obj = form_add2.value.virtualPointMap[item];
                expressionList[i].obj.code =
                  form_add2.value.virtualPointMap[item].sensorId;
                let codeList = await getpointIdsListData(
                  form_add2.value.virtualPointMap[item].sensorId
                );
                expressionList[i].obj.codeList = codeList;
              }
            } else {
              expressionList[i].value = null;
              expressionList[i].obj = res.data.templateNodeMap[item];
              let codeList = await getpointIdsListData(
                res.data.templateNodeMap[item].code
              );
              expressionList[i].obj.codeList = codeList;
            }
          }
        });
      }
      expressionVoList.value = expressionList;
      if (editpointId.value && form_add2.value.virtualPointList.length > 0) {
        expressionVoList.value[0].value =
          form_add2.value.virtualPointList[0].pointName;
        expressionVoList.value[0].obj.pointName =
          form_add2.value.virtualPointList[0].pointName;
        expressionVoList.value[2].obj.pointName =
          form_add2.value.virtualPointList[1].pointName;
        expressionVoList.value[2].value =
          form_add2.value.virtualPointList[1].pointName;
      }
    });
  };

  function getpointIdsListData(data) {
    return new Promise((resolve, reject) => {
      getPointIdsList({
        code: data,
      }).then((res) => {
        resolve(res.data);
      });
    });
  }

  // 弹窗关闭时执行
  const closeMoadl = () => {
    form_add2.value = {
      gasDrainageGroupno: 1,
      hasUpGrandAlarm: false,
      hasDownGrandAlarm: false,
      hasMoreGrandAlarm: false,
      hasChangeGrandAlarm: false,
      calibration: {
        isCalibration: false,
      },
      alarmBasic: {},
      prealarmBasic: {},
      upGrandalarmBasic: {
        grandalarmRate: {},
      },
      downGrandalarmBasic: {
        grandalarmRate: {},
      },
      cutArea: {},
      cutValueList: [{
        title: "断电配置",
        name: "1",
        cutStationList: [{
          controlPort: "",
          pointPlaceName: "",
        }, ],
      }, ],
    };
    collapseAtive.value = 0;
  };

  // 打开测点编辑弹窗
  const openPointEdit = (item) => {
    open_add2.value = true;
    pointactiveNameList.value = [{
        name: "报警配置",
        type: 1,
      },
      {
        name: "分级配置",
        type: 2,
      },
      {
        name: "普通断电",
        type: 3,
      },
      {
        name: "区域断电",
        type: 4,
      },
    ];
    editpointId.value = item.pointId;
    if (item.pointType == 1) {
      if (tabPosition2.value == 2) {
        pointactiveNameList.value = [{
          name: "报警配置",
          type: 1,
        }, ];
      }
      getponitdetailData(item.pointId);
    } else if (item.pointType == 2) {
      getponitdetailData(item.pointId.slice(0, 6));
    } else if (item.pointType == 3) {
      getponitdetailData(item.pointId);
      pointactiveNameList.value = [{
        name: "报警配置",
        type: 1,
      }, ];
    }
  };
  // 打开测点编辑弹窗
  const openPointEdit2 = (item, n) => {
    open_add2.value = true;
    editpointId.value = item.pointId;
    if (item.pointType == 1) {
      getponitdetailData(item.pointId, n);
    } else if (item.pointType == 2) {
      getponitdetailData(item.pointId.slice(0, 6));
      if (n) {
        activeNamePoint.value = n;
      } else {
        activeNamePoint.value = 1;
      }
    } else if (item.pointType == 3) {
      getponitdetailData(item.pointId);
      pointactiveNameList.value = [{
        name: "报警配置",
        type: 1,
      }, ];
      if (n) {
        activeNamePoint.value = n;
      } else {
        activeNamePoint.value = 1;
      }
    }
  };

  // 打开新增开出口弹窗
  const openControlPorts = (item) => {
    open_port.value = true;
    form_add.value.stationCode = subStationInfo.value.stationCode;
    if (item.controlPortType) {
      getopendetailData(item.controlPort, subStationInfo.value.stationCode);
      controlSourceData.value.query.controlPointIds = item.pointId;
      getcontrolSourceList();
    } else {
      controlPortTypeId.value = null;
      form_add.value.controlPort = item.controlPort;
    }
  };

  // 获取开出口详情
  const getopendetailData = (id, stationCode) => {
    axios
      .get(
        "/controlPort/detail?controlPort=" + id + "&stationCode=" + stationCode
      )
      .then((res) => {
        form_add.value = res.data;
        controlPortTypeId.value = true;
      });
  };

  // 新增开出口提交
  const addopenClick = () => {
    proxy.$refs["formRef2"].validate((valid) => {
      if (valid) {
        if (controlPortTypeId.value != null) {
          axios.post("/controlPort/edit", form_add.value).then((res) => {
            if (res.code == 200) {
              proxy.$modal.msgSuccess(res.msg);
              open_port.value = false;
              getControlPorts(subStationInfo.value.stationCode);
            }
          });
        } else {
          axios.post("/controlPort/add", form_add.value).then((res) => {
            if (res.code == 200) {
              proxy.$modal.msgSuccess(res.msg);
              open_port.value = false;
              getControlPorts(subStationInfo.value.stationCode);
            }
          });
        }
      }
    });
  };

  // 控制源列表
  const getcontrolSourceList = () => {
    axios
      .post("/point/controlList", controlSourceData.value.query)
      .then((res) => {
        controlSourceData.value.tabledata = res.data.list;
        controlSourceData.value.total = res.data.total;
      });
  };

  // 开出口安装地点下拉事件
  const pointPlaceIdopenChange = (val) => {
    addressInfoList.value.forEach((item) => {
      if (val == item.id) {
        form_add.value.pointPlaceName = item.placeName;
      }
    });
  };

  // 获取所有通道编号
  const getAllchannelNO = () => {
    axios.get("/station/channelNoList").then((res) => {
      channelList.value = res.data;
    });
  };

  // 获取通道下分站
  const getchannelInfo = (i, id) => {
    if (sIndex.value == i) {
      sIndex.value = null;
    } else {
      sIndex.value = i;
      axios.post(`/station/containNetDetail`, {
        channelNo: id
      }).then((res) => {
        channelInfo.value = res.data.selectedNetworkList;
      });
    }
  };

  // 打开更换通道弹窗
  const openupDateChannel = () => {
    eidt_channel.value = true;
  };

  // 选择下属分站
  const chooseStation = (item, index) => {
    let arrIndex = stationBasicDtoList.value.indexOf(item);
    if (arrIndex > -1) {
      stationBasicDtoList.value.splice(arrIndex, 1);
    } else {
      stationBasicDtoList.value.push(item);
    }
    form_channel.value.stationBasicDtoList = stationBasicDtoList.value;
  };

  // 确认更换通道
  const confirmReplace = () => {
    axios.post("/station/modifyNetDetail", form_channel.value).then((res) => {
      if (res.code == 200) {
        ElMessage.success("操作成功");
        stationBasicDtoList.value = [];
        form_channel.value = {};
        eidt_channel.value = false;
        sIndex.value = null;
        getAllchannelNO();
      }
    });
  };

  function delObj(obj, keys) {
    keys.map(function (key) {
      delete obj[key];
    });
    return obj;
  }

  // 断电配置分站删除
  function fenzhankong(val) {
    if (form_add2.value.pointType == 2) {
      form_add2.value.multiplePointBranchList.forEach((item, index) => {
        if (mulactiveNamePoint.value == item.sensorId) {
          item.cutValueList.forEach((item1, index1) => {
            if (ordintranValue.value == index) {
              item1.cutStationList.splice(val, 1);
            }
          });
        }
      });
    } else {
      form_add2.value.cutValueList.forEach((item, index) => {
        if (ordintranValue.value == index) {
          item.cutStationList.splice(val, 1);
        }
      });
    }
  }

  // 分站删除
  const delStation = (item) => {
    ElMessageBox.confirm("是否确认删除分站?", {
      confirmButtonText: "确认",
      cancelButtonText: "取消",
      type: "warning",
    }).then(() => {
      axios.post("/station/delete", [item.stationCode]).then((res) => {
        if (res.code == 200) {
          ElMessage.success("操作成功");
          open_detail.value = false;
          open_edit.value = false;
          getSubStation();
          activeName.value = "1";
          getStationCodes();
        }
      });
    });
  };
  // 测点删除
  const delPoint = (id) => {
    ElMessageBox.confirm("是否确认删除测点?", {
      confirmButtonText: "确认",
      cancelButtonText: "取消",
      type: "warning",
    }).then(() => {
      if (form_add2.value.pointType == 3) {
        useLog({
          templateType: "公式",
          templateName: form_add2.value.sensorName,
          usageUser: "删除" + form_add2.value.pointId
        })
      }

      axios.post(`/point/delete?pointId=${id}`).then((res) => {
        if (res.code == 200) {
          ElMessage.success("操作成功");
          editpointId.value = undefined;
          open_add2.value = false;
          getPointList(subStationInfo.value.stationCode);
          getPowerPoints(subStationInfo.value.stationCode);
        }
      });
    });
  };
  // 选择分站安装地点时执行
  const selectPlace = (val) => {
    if (val) {
      let bl;
      bl = addressInfoList.value.some((item) => {
        return item.placeName == val;
      });
      if (!bl) {
        form_edit.value.stationPlaceId = null;
      }
    }
  };
  // 鼠标悬浮获取分站测点列表
  const getPointList2 = (item, num) => {
    showDetail.value = item;
    showNum.value = num;
    let n;
    if (num == 1) {
      n = 0;
    } else if (num == 2) {
      n = 1;
    }
    axios
      .post("/point/allList", {
        stationCode: item.stationCode,
        status: n
      })
      .then((res) => {
        stationPoint.value = [];
        res.data.forEach((item) => {
          if (item.pointId != null) {
            stationPoint.value.push(item);
          }
        });
      });
  };

  // 报警模式选择
  const alarmBasicChange = (val) => {
    form_add2.value.alarmBasic = {
      alarmType: val
    };
  };
  // 多参报警模式选择
  const alarmBasicChange2 = (item) => {
    item.obj.alarmBasic = {
      alarmType: item.obj.alarmBasic.alarmType
    };
  };
  const templateTreeChange = (id) => {
    getbiaodashiList(id);
     if (proxy.$refs["templateref"].getCheckedNodes()[0]) {
      form_add2.value.sensorName = proxy.$refs["templateref"].getCheckedNodes()[0].label
      if (
        proxy.$refs["templateref"]
        .getCheckedNodes()[0]
        .pathLabels[0].includes("开关")
      ) {
        baohanD.value = "D";
      } else {
        baohanD.value = "A";
      }
     }
  };
  // 新增公式模版
  const addtemplateClick = () => {
    addtemModal.value = true;
  };
  const addtemModalcancel = () => {
    addtemModal.value = false;
  };
  const mobanTypeChange = (val) => {
    mobanType.value = val;
  };

  let intervalId = null;
  // 分站左右数据定时刷新
  watch(
    () => showcedian.value,
    (n, o) => {
      if (n) {
        intervalId = setInterval(() => {
          getControlPorts(subStationInfo.value.stationCode);
          getSubStation();
          getPointList(subStationInfo.value.stationCode);
          getPowerPoints(subStationInfo.value.stationCode);
        }, 10000);
        clearInterval(timer);
      } else {
        clearInterval(intervalId);
        intervalId = null;
      }
    }
  );

  // 即插即用设备查询
  const getDevs = () => {
    axios.get("/realPlug/config").then((res) => {
      realPlugs.value = res.data;
      realPlugs.value.forEach((item) => {
        item.plugPlace = "";
      });
    });
  };
  // 添加即插即用设备
  const addPlugDev = (item) => {
    if (item.plugPlace == "") {
      ElMessage.error("安装地点不能为空");
    } else {
      axios
        .get(
          `/realPlug/add?pointId=${item.pointId}&pointPlaceId=${item.plugPlace}`
        )
        .then((res) => {
          if (res.code == 200) {
            ElMessage.success(res.msg);
            getDevs();
            getDevtList();
            item.plugPlace == "";
          } else {
            ElMessage.warning(res.msg);
          }
        });
    }
  };

  let timer = null;
  onMounted(() => {
    getSubStation();
    getAreaList();
    getDevtList();
    getDevs();
    getAddressInfo();
    getSearchTree();
    getChannelNoList();
    getStationCodes();
    getSubstationType();
    getSensorList();
    getMultipleSensorList();
    getTemplateTree();
    getTypesInfo();
    getFeedList();
    getAllchannelNO();
    timer = setInterval(() => {
      getSubStation();
    }, 10000);
  });
  onUnmounted(() => {
    clearInterval(intervalId);
    clearInterval(timer);
  });
</script>
<style lang="scss" scoped>
  ::v-deep .el-collapse-item__header {
    background-color: #f2f7fa !important;
  }

  ::v-deep .el-collapse-item__wrap {
    background-color: #f2f7fa !important;
  }

  .mobanTypeClass {
    cursor: pointer;
    border-radius: 4px;
    color: rgba(62, 70, 79, 1);
    font-weight: 400;
    padding: 10px;
    white-space: nowrap;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    width: 100%;

    span {
      display: inline-block;
    }

    &.active {
      background-color: rgba(64, 158, 255, 0.2);
      color: rgba(64, 158, 255, 1);
    }

    em {
      width: 20px;
      height: 20px;
      line-height: 20px;
      display: inline-block;
      font-style: normal;
      text-align: center;
      border-radius: 50%;
      background-color: rgba(64, 158, 255, 1);
      color: #fff;
    }
  }

  .nodata2 {
    margin: auto;
    width: 200px;
    height: 100%;
    font-size: 14px;
    color: rgba(182, 191, 204, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    img {
      width: 300px;
    }
  }

  .yichang {
    background-color: #f4efe7 !important;
  }

  .yichang:hover {
    background-color: #f3ebde !important;
  }

  .baojing {
    background-color: #f5eaea !important;
  }

  .baojing:hover {
    background-color: #f5e4e4 !important;
  }

  .huise {
    background-color: rgba(239, 239, 240, 0.4) !important;
  }

  .huise:hover {
    background-color: #e9ebec !important;
  }

  .select {
    background-color: #f0f7ff !important;
    border: 1px solid rgba(64, 158, 255, 1);
  }

  .select1 {
    background-color: #f5eaea !important;
    border: 1px solid #f56c6c;
  }

  .select2 {
    background-color: #f4efe7 !important;
    border: 1px solid #e6a23c;
  }

  .active {
    color: rgba(64, 158, 255, 1);
  }

  .tabs_active {
    background-color: #e8f1ff;
    color: rgba(64, 158, 255, 1);
  }

  .head_box {
    display: flex;
    align-items: center;

    img {
      margin-right: 8px;
    }
  }

  .eidt_channelBox {
    height: 100%;
    position: relative;

    .one {
      margin: 0 0 32px 0;

      .title {
        margin: 0 0 12px 0;
        font-size: 14px;
        color: rgba(62, 70, 79, 0.8);
      }
    }

    .footer_btn {
      position: absolute;
      right: 0;
      bottom: 0;
    }
  }

  .activeNameTab {
    color: #333;
    font-size: 14px;
    font-weight: 700;
    padding: 0 10px;

    .span1,
    .span {
      position: relative;
      margin-right: 20px;
      cursor: pointer;

      &.span1 {
        margin-right: 0;
        padding: 8px 20px;
        border-radius: 4px 4px 0 0;
      }

      &.active {
        position: relative;

        &::before {
          position: absolute;
          content: "";
          left: 50%;
          bottom: -10px;
          width: 56px;
          height: 2px;
          background-color: rgba(64, 158, 255, 1);
          transform: translate(-50%, -50%);
        }
      }

      &.active1 {
        border-radius: 4px 4px, 0px, 0px;
        background: linear-gradient(180deg,
            rgba(91, 109, 128, 0.12) 0%,
            rgba(91, 109, 128, 0.04) 100%);
      }
    }
  }

  .desc_box {
    padding: 10px;
    background: rgba(91, 109, 128, 0.04);
    margin: 10px 10px 0;
  }

  ::v-deep .putongClass .el-tabs__item {
    width: 130px;
    height: 34px;

    .el-icon {
      position: relative;
      height: 20px !important;
      width: 20px !important;

      &:after {
        position: absolute;
        content: url("@/assets/icons/svg/delkong.svg");
        top: 2px;
        left: 2px;
      }
    }

    .el-icon svg {
      display: none;
    }
  }

  ::v-deep .vxe-modal--wrapper .vxe-modal--header {
    padding: 0 !important;
    height: 40px !important;
    background: rgba(64, 158, 255, 0.4) !important;
    border-bottom: none;
  }

  .demo-tabs {
    .custom-tabs-label {
      display: flex;
      align-items: center;
    }

    .tabs_box {
      height: 220px;
    }

    .one {
      display: flex;
      flex-direction: column;
      justify-content: space-between;

      .data_row {
        display: flex;
        justify-content: space-between;
      }

      .data_item {
        width: 154px;
        height: 36px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        color: rgba(62, 70, 79, 1);
        font-size: 14px;

        .item_title {
          color: rgba(62, 70, 79, 0.6);
        }
      }
    }

    .two {
      display: flex;
      justify-content: space-between;

      .items {
        font-size: 14px;
        color: rgba(62, 70, 79, 0.8);
      }
    }

    .three {
      height: 300px;
      padding: 16px;
      display: flex;
      flex-direction: column;

      .three_header {
        display: flex;
        justify-content: space-between;
        color: rgba(62, 70, 79, 0.8);
        font-size: 14px;

        .header_item {
          display: flex;
          align-items: center;
        }

        .btns {
          width: 140px;
          display: flex;
          justify-content: space-between;
        }
      }

      .table {
        margin-top: 12px;
      }
    }
  }

  .demo-tabs2 {
    .custom-tabs-label {
      display: flex;
      align-items: center;
    }

    .tabs_box {
      height: 220px;
    }

    .one {
      display: flex;
      flex-direction: column;
      justify-content: space-between;

      .header {
        display: flex;
        justify-content: space-evenly;
        color: rgba(62, 70, 79, 0.8);
        font-size: 14px;

        .header_item {
          display: flex;
          align-items: center;
        }

        .btns {
          width: 140px;
          display: flex;
          justify-content: space-between;
        }

        .addbtn {
          display: flex;
          align-items: center;
          color: rgba(64, 158, 255, 1);
        }
      }
    }

    .two {
      display: flex;
      justify-content: space-between;

      .items {
        font-size: 14px;
        color: rgba(62, 70, 79, 0.8);
      }
    }

    .three {
      height: 300px;
      padding: 16px;
      display: flex;
      flex-direction: column;

      .three_header {
        display: flex;
        justify-content: space-between;
        color: rgba(62, 70, 79, 0.8);
        font-size: 14px;

        .header_item {
          display: flex;
          align-items: center;
        }

        .btns {
          width: 140px;
          display: flex;
          justify-content: space-between;
        }
      }

      .table {
        margin-top: 12px;
      }
    }
  }

  // 分站详情
  ::v-deep .detail {
    width: 912px !important;

    // height: 100%;
    .detail_box {
      width: 100%;
      height: 100%;

      .basic_info {
        padding: 16px;
        height: 285px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;

        .location {
          display: flex;
          align-items: center;
          font-size: 14px;
          font-weight: 700;
          color: rgba(62, 70, 79, 1);
        }

        .line {
          height: 1px;
          background-color: rgba(91, 109, 128, 0.3);
        }

        .info_data {
          height: 204px;
          display: flex;
          justify-content: space-between;
          align-items: center;

          .img_box {
            width: 200px;
            height: 142px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;

            .name {
              font-weight: 700;
            }

            img {
              width: 51px;
              height: 66px;
            }
          }

          .data_box {
            width: 632px;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-between;

            .data_row {
              display: flex;
            }

            .data_item {
              height: 36px;
              display: flex;
              flex-direction: column;
              justify-content: space-between;
              color: rgba(62, 70, 79, 1);
              font-size: 14px;

              .item_title {
                color: rgba(62, 70, 79, 0.6);
              }
            }
          }
        }

        .others {
          height: 275px;
        }
      }
    }

    .footer_btns {
      display: flex;
      justify-content: space-between;
    }
  }

  // 分站编辑
  ::v-deep .edit {
    width: 912px !important;

    // height: 100%;
    .edit_box {
      width: 100%;
      height: 100%;

      .basic_info {
        padding: 16px;
        height: 380px;
      }

      .basic_info2 {
        padding: 16px;
      }

      .others {
        height: calc(100% - 380px);
      }
    }

    .footer_btns {
      display: flex;
      justify-content: space-between;
    }
  }

  ::v-deep .temp {
    width: 1000px !important;

    // height: 100%;
    .temp_box {
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: space-between;

      .tabs {
        width: 160px;
        height: 100%;

        .items {
          padding: 11px;
          height: 40px;
          font-size: 14px;
          font-weight: 700;
          display: flex;
          align-items: center;
          justify-content: space-between;

          .num {
            width: 20px;
            height: 20px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: normal;
            background-color: rgba(64, 158, 255, 1);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
          }
        }
      }

      .temp_list {
        width: 784px;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;

        .search {
          display: flex;
          justify-content: space-between;

          .add_btn {
            padding: 4px 10px;
            width: 72px;
            height: 32px;
            font-size: 14px;
            color: rgba(64, 158, 255, 1);
            display: flex;
            align-items: center;

            img {
              width: 20px;
              height: 20px;
              margin-right: 4px;
            }
          }
        }

        .list {
          height: calc(100% - 48px);
          display: flex;
          flex-wrap: wrap;
          align-content: flex-start;
          justify-content: space-between;

          .tag {
            width: 40px;
            height: 20px;
            background-color: #c4e9f6;
            color: rgba(10, 170, 220, 1);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
          }

          .items1 {
            padding: 16px;
            width: 384px;
            height: 148px;
            background-color: rgba(10, 170, 220, 0.1);
            font-size: 14px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-direction: column;

            .top {
              width: 100%;
              display: flex;
              justify-content: space-between;

              .name {
                font-weight: 700;
                width: 232px;
              }

              .btns {
                color: rgba(64, 158, 255, 1);
              }
            }

            .bottom {
              padding: 16px;
              width: 100%;
              height: 80px;
              background-color: #fff;
              border-radius: 4px;
              display: flex;
              flex-direction: column;
              justify-content: space-between;

              .b_box {
                display: flex;

                .one {
                  margin-right: 8px;
                  width: 60px;
                  font-size: 14px;
                  color: rgba(62, 70, 79, 0.6);
                }

                .two {
                  span:not(:last-child) {
                    margin-right: 10px;
                  }
                }

                .three {
                  color: rgba(64, 158, 255, 1);
                  display: flex;
                  align-items: center;
                }
              }
            }
          }

          .items2 {
            padding: 16px;
            width: 384px;
            height: 238px;
            background-color: rgba(10, 170, 220, 0.1);
            font-size: 14px;
            border-radius: 4px;

            .top {
              width: 100%;
              display: flex;
              justify-content: space-between;

              .name {
                font-weight: 700;
                width: 232px;
              }

              .btns {
                color: rgba(64, 158, 255, 1);
              }

              .tag2 {
                color: rgba(47, 173, 104, 1);
                background-color: #d1eddd;
              }
            }

            .bottom {
              padding: 16px;
              width: 100%;
              height: 170px;
              background-color: #fff;
              border-radius: 4px;
              display: flex;
              flex-direction: column;
              justify-content: space-between;

              .b_box {
                display: flex;

                .one {
                  margin-right: 8px;
                  width: 60px;
                  font-size: 14px;
                  color: rgba(62, 70, 79, 0.6);
                }

                .two {
                  display: flex;
                  align-items: center;

                  span:not(:last-child) {
                    margin-right: 10px;
                  }
                }

                .three {
                  color: rgba(64, 158, 255, 1);
                  display: flex;
                  align-items: center;
                }
              }
            }
          }
        }
      }
    }

    .temp_box2 {
      .name {
        margin-bottom: 16px;
        font-size: 14px;
        color: rgba(62, 70, 79, 0.8);
        display: flex;
        align-items: center;

        div {
          margin-left: 12px;
          width: 341px;
          height: 32px;
          padding: 7px 12px;
          color: rgba(62, 70, 79, 1);
          background-color: rgba(91, 109, 128, 0.1);
        }
      }
    }

    .footer_btns {
      display: flex;
      justify-content: space-between;
    }
  }

  .formBox {
    // border: 1px solid rgba(247, 247, 247, 1);
    padding-bottom: 10px;
  }

  ::v-deep .port_box {
    .boxone {
      padding: 16px;
      height: 184px;
      background-color: #f0f3fa;
      border-radius: 4px;
    }

    .drawer_sub_title {
      margin: 20px 0 12px 0 !important;
    }
  }

  //  隐藏设备列表
  .hiddDev {
    width: 0px !important;
    padding: 0 !important;
  }

  // 展开分站列表
  .openSub {
    width: 100% !important;
  }

  // 展开分站列表
  .openCedian {
    width: 390px !important;

    .list_box {
      .item {
        margin-left: 0px !important;
      }
    }
  }

  .pagestyle {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .head {
      display: flex;
      justify-content: space-between;

      .tabs {
        width: 188px;
        display: flex;
        justify-content: space-between;
        color: rgba(62, 70, 79, 0.4);
        font-weight: 700;

        div {
          display: flex;
          align-items: center;
        }
      }
    }

    .container {
      height: calc(100% - 44px);

      .title {
        width: 260px;
        display: flex;
        align-items: center;
        color: rgba(62, 70, 79, 1);
      }

      .substation {
        height: 100%;
        display: flex;
        justify-content: space-between;

        .substationList {
          padding: 16px;
          width: calc(100% - 452px);
          height: 100%;
          background-color: rgba(255, 255, 255, 0.9);
          border-radius: 8px;
          display: flex;
          flex-direction: column;
          justify-content: space-between;

          .list_head {
            display: flex;
            justify-content: space-between;

            .filter {
              display: flex;
              align-items: center;
            }
          }

          .list_box {
            height: calc(100% - 32px);
            overflow: auto;
            display: flex;
            flex-wrap: wrap;
            align-content: flex-start;

            .item {
              margin-left: 30px;
              margin-bottom: 12px;
              position: relative;
              padding: 12px 16px;
              width: 360px;
              height: 64px;
              background-color: #efeff0;
              display: flex;
              justify-content: space-between;
              border-radius: 4px;

              .img {
                width: 34px;
                height: 34px;
                position: relative;
                display: flex;
                align-items: center;

                .yc {
                  position: absolute;
                  bottom: -3px;
                  right: -3px;
                }
              }

              .item_info {
                padding: 0 8px;
                width: 282px;
                height: 100%;
                font-size: 14px;
                color: rgba(62, 70, 79, 1);
                display: flex;
                flex-direction: column;
                justify-content: space-between;

                .info_name {
                  font-size: 14px;
                  font-weight: 700;
                  display: flex;
                  justify-content: space-between;
                }

                .info_data {
                  display: flex;
                  justify-content: space-between;

                  .one {
                    width: 120px;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                  }

                  .two {
                    display: flex;
                    align-items: center;

                    span:first-child {
                      margin: 0px 8px 0 8px !important;
                    }

                    span:not(:last-child) {
                      margin: 0 8px 0 0;
                    }
                  }
                }
              }

              .caozuo {
                position: absolute;
                top: 10px;
                right: 22px;
                width: 88px;
                z-index: 9;
                // height: 132px;
                background-color: #fff;
                border-radius: 4px;
                font-size: 14px;
                border: 1px solid rgba(62, 70, 79, 0.1);

                .selects {
                  height: 32px;
                  display: flex;
                  justify-content: center;
                  align-items: center;
                }

                .selects:hover {
                  background-color: #f2f3f4;
                }
              }

              .caozuo2 {
                padding: 8px;
                width: 149px;
                // height: 106px;
                top: 50px;
                right: 0;
                display: flex;
                flex-direction: column;

                // justify-content: space-between;
                .selects2 {
                  padding: 8px;
                  height: 30px;
                  display: flex;
                  justify-content: space-between;
                  align-items: center;

                  span {
                    margin-left: 16px;
                  }
                }

                .hover:hover {
                  background-color: #f0f3f4;
                }

                .selects3 {
                  padding: 8px;
                  justify-content: center;

                  span {
                    margin-left: 0;
                  }
                }
              }

              .yc_show {
                padding: 4px 8px 0;
                display: flex;
                flex-direction: column;
                position: absolute;
                top: 50px;
                left: 30px;
                font-size: 14px;
                background-color: #fff;
                border: 1px solid rgba(62, 70, 79, 0.1);
                border-radius: 4px;
                z-index: 9;

                .selects2 {
                  padding: 8px;
                  margin-bottom: 4px;
                  height: 30px;
                  display: flex;
                  align-items: center;

                  img {
                    margin-right: 8px;
                  }
                }
              }

              .caozuo3 {
                width: 275px;

                .pointS {
                  padding: 8px;
                  display: flex;
                  justify-content: space-between;
                  align-items: center;

                  span {
                    margin: 0;
                    width: 65px;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                  }
                }
              }
            }

            .item:hover {
              background-color: #e9ebec;
            }
          }
        }

        .deviceList {
          padding: 16px;
          width: 440px;
          height: 100%;
          background-color: rgba(255, 255, 255, 0.9);
          border-radius: 8px;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          transition: width 0.5s ease;

          .list_head {
            display: flex;
            justify-content: space-between;

            .filter {
              display: flex;
              align-items: center;
            }
          }

          .list_box {
            height: calc(100% - 32px);
            overflow: auto;

            .btns {
              height: 32px;
              display: flex;
              justify-content: space-between;
              align-items: center;

              .shuaxin {
                font-size: 14px;
                display: flex;
                align-items: center;
              }
            }

            .items {
              padding: 12px 16px;
              height: 100px;
              font-size: 14px;
              display: flex;
              flex-direction: column;
              justify-content: space-between;

              .one {
                display: flex;
                justify-content: space-between;
                align-items: center;
              }

              .two {
                height: 42px;
                display: flex;
                justify-content: space-between;
                position: relative;

                .vName {
                  width: 55px;
                  height: 42px;
                  font-size: 14px;
                  font-weight: 500;
                  color: #77ba6a;
                  display: flex;
                  align-items: center;
                  justify-content: center;
                  background-color: #def2da;
                }

                .two_info {
                  width: 305px;
                  display: flex;
                  justify-content: space-between;
                  align-items: center;
                  height: 100%;

                  .info1 {
                    height: 100%;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;

                    span {
                      font-size: 16px;
                      font-weight: 700;
                      color: #67c23a;
                    }

                    div:first-child {
                      width: 142px;
                      white-space: nowrap;
                      overflow: hidden;
                      text-overflow: ellipsis;
                    }
                  }

                  .info2 {
                    height: 100%;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
                  }

                  img {
                    width: 20px;
                    height: 20px;
                  }
                }

                .tags {
                  position: absolute;
                  left: 0;
                  bottom: 0;
                  z-index: 9;
                  height: 14px;
                }
              }
            }

            .nodata {
              margin: auto;
              width: 200px;
              height: 214px;
              font-size: 14px;
              color: rgba(182, 191, 204, 1);
              display: flex;
              flex-direction: column;
              align-items: center;

              img {
                width: 200px;
              }
            }
          }
        }

        .ceDianList {
          padding: 16px;
          width: calc(100% - 408px);
          height: 100%;
          background-color: rgba(255, 255, 255, 0.9);
          border-radius: 8px;

          .cd_head {
            display: flex;
            justify-content: space-between;

            .filter {
              height: 32px;
              display: flex;
              align-items: center;

              div {
                margin: 0 0 0 8px;
                font-size: 14px;
                color: rgba(64, 158, 255, 1);
                display: flex;
                align-items: center;
              }
            }
          }

          .cd_box {
            height: calc(100% - 44px);
            overflow: auto;
            position: relative;

            .items {
              padding: 13px;
              height: 64px;
              display: flex;
              justify-content: space-between;
              align-items: center;
              position: relative;
              cursor: pointer;

              .num {
                width: 40px;
                height: 40px;
                background: #f0f7ff;
                font-size: 16px;
                font-weight: 700;
                display: flex;
                align-items: center;
                justify-content: center;
              }

              .num2 {
                background: none;
              }

              .cgq_img {
                width: 40px;
                height: 40px;
                background: #def2da;
                border-radius: 50px;
                display: flex;
                align-items: center;
                justify-content: center;
                overflow: hidden;

                img {
                  width: 40px;
                  // height: 28px;
                }

                .vName {
                  font-size: 14px;
                  font-weight: 500;
                  color: #77ba6a;
                }
              }

              .items_info {
                width: 38%;
                height: 100%;
                display: flex;
                flex-direction: column;
                justify-content: space-between;

                .one {
                  font-size: 14px;
                  font-weight: 700;
                }
              }

              .data {
                width: 13%;
                height: 100%;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                font-size: 14px;

                div:nth-child(2) span {
                  color: rgba(103, 194, 58, 1);
                  font-size: 16px;
                  font-weight: 700;
                }
              }

              .btn {
                width: 60px;
                height: 32px;
                background-color: #f3faf0;
                color: #67c23a;
                font-size: 14px;
                font-weight: 700;
                display: flex;
                align-items: center;
                justify-content: center;
              }

              .add {
                width: calc(100% - 56px);
                font-size: 14px;
                color: #409eff;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
              }

              .zhijian {
                background-color: #f8f5fd !important;
                color: #ab7ae0 !important;
              }

              .btn2 {
                width: 60px;
                height: 32px;
              }
            }

            .items2 {
              .infos {
                .one {
                  font-size: 12px;
                  color: rgba(62, 70, 79, 0.6);
                }

                .two {
                  font-size: 14px;
                  color: rgba(62, 70, 79, 1);
                }
              }

              .xq {
                color: rgba(64, 158, 255, 1);
                font-size: 14px;
              }

              .infos1 {
                width: 56px;
              }

              .infos2 {
                width: 250px;
              }

              .infos3 {
                width: 350px;
              }
            }

            .type_box {
              position: absolute;
              top: 46px;
              left: 650px;
              z-index: 9;
              padding: 4px 0;
              width: 116px;
              height: 104px;
              background-color: #fff;

              .t_item {
                width: 100%;
                height: 32px;
                font-size: 14px;
                color: rgba(62, 70, 79, 1);
                display: flex;
                align-items: center;
                justify-content: center;
              }

              .t_item:hover {
                cursor: pointer;
                background-color: #f0f3f4;
              }
            }

            .newPos {
              top: 0;
              left: 1075px;
            }
          }
        }
      }

      .channel {
        padding: 16px;
        height: 100%;
        background-color: #fff;
        display: flex;
        justify-content: space-between;

        .channels {
          width: 33.81%;
          height: 100%;

          .channels_head {
            display: flex;
            justify-content: space-between;

            .two {
              font-size: 14px;
              font-weight: 700;
              color: rgba(64, 158, 255, 1);
            }
          }

          .channels_box {
            margin: 12px 0 0 0;
            max-height: calc(100% - 33px);
            overflow: auto;
            display: flex;
            flex-wrap: wrap;

            .items {
              margin: 0 12px 12px 0;
              width: 125px;
              height: 58px;
              color: rgba(62, 70, 79, 1);
              font-size: 16px;
              font-weight: 700;
              display: flex;
              justify-content: space-evenly;
              align-items: center;
              flex-direction: column;
              background-color: #f9f9fa;
              border-radius: 4px;
              cursor: pointer;

              .xj {
                font-size: 12px;
                color: rgba(62, 70, 79, 1);
                font-weight: normal;

                span {
                  font-size: 14px;
                  font-weight: 700;
                  color: rgba(64, 158, 255, 1);
                }
              }
            }
          }
        }

        .subchannel {
          width: 65.36%;
          height: 100%;
          display: flex;
          flex-direction: column;

          .subchannel_head {
            display: flex;
            justify-content: space-between;

            .title {
              width: 300px;
              display: flex;
              align-items: center;
              color: rgba(62, 70, 79, 1);
            }

            .two {
              font-size: 14px;
              font-weight: 700;
              color: rgba(64, 158, 255, 1);
              cursor: pointer;
            }
          }

          .subchannel_box {
            margin: 18px 0 0 0;
            max-height: calc(100% - 57px);
            display: flex;
            flex-wrap: wrap;

            .s_item {
              padding: 12px 16px;
              margin: 0 12px 16px 0;
              width: calc((100% / 3) - 12px);
              height: 64px;
              background-color: #f9f9fa;
              border-radius: 4px;
              display: flex;
              justify-content: space-between;
              position: relative;
              cursor: pointer;

              .left {
                width: 56px;
                height: 100%;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                font-size: 14px;
                color: rgba(62, 70, 79, 1);

                .stationCode {
                  font-weight: 700;
                }
              }

              .right {
                width: calc(100% - 72px);
                height: 100%;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                font-size: 14px;
                color: rgba(62, 70, 79, 1);
              }

              .img {
                position: absolute;
                right: 0;
                bottom: 0;
              }
            }
          }
        }

        .line {
          margin: 0 8px;
          width: 1px;
          height: 100%;
          background-color: rgba(91, 109, 128, 1);
        }
      }
    }
  }
</style>